Greasy Fork

来自缓存

Greasy Fork is available in English.

gaoding去水印

去水印神器,联系:xhcc2023

当前为 2024-12-05 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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;
    };
})();