gaoding去水印

去水印神器,联系:xhcc2023

目前为 2024-12-05 提交的版本。查看 最新版本

// ==UserScript==
// @name        gaoding去水印
// @description 去水印神器,联系:xhcc2023
// @namespace   maomao1996.kill-watermark
// @version     1.0.1
// @author      solid
// @license     MIT
// @match       *://*.gaoding.com/editor/*
// @grant       GM_addStyle
// ==/UserScript==

!(function() {
    "use strict";
    
    // 水印样式处理
    let h = 'div[style*="visibility"][style*="display"][style*="position"][style*="top"][style*="left"] {\n      clip-path:circle(0) !important;\n      //z-index:-1 !important;\n  }\n      ',
    t = '.water,.watermark {\n        clip-path:circle(0)!;\n        display:none;\n    }\n    .material-water-mark{\n    clip-path:circle(0)!;\n        display:none;\n    }\n    ',
    h2 = 'div[style*="pointer-events"][style*="background"][style*="position"][style*="top"][style*="left"] {\n      clip-path:circle(0) !important;\n      //z-index:-1 !important;\n  }\n      ';
    
    // 添加样式
    GM_addStyle(h);
    GM_addStyle(h2);
    GM_addStyle(t);

    // 处理Math.max
    var originalMathMax = Math.max;
    Math.max = function() {
        var args = Array.prototype.slice.call(arguments);
        var result = originalMathMax.apply(null, args);
        if (args[0] <= 500 && args[1] == 256) {
            const sizeInfo = document.querySelector('[test-id="right-canvas-size-info"]');
            let width = 1024;
            if (sizeInfo) {
                const text = sizeInfo.textContent;
                const matches = text.match(/(\d+)\s*×\s*(\d+)/);
                width = matches[1];
            }
            return width;
        }
        return result;
    };

    // 处理URL.createObjectURL
    var originalCreateObjectURL = URL.createObjectURL;
    URL.createObjectURL = function(blob) {
        if (blob.type == 'image/svg+xml') {
            blob = new Blob([''], {
                type: 'image/svg+xml'
            });
        }
        var url = originalCreateObjectURL(blob);
        return url;
    };
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址