当前位置:首页>java>素材不求人!这段代码复制进浏览器即可实现设计素材自由~

素材不求人!这段代码复制进浏览器即可实现设计素材自由~

  • 2026-10-14 03:45:00
素材不求人!这段代码复制进浏览器即可实现设计素材自由~

一键解锁 9 大设计平台去水印自由

✅ 支持平台:可去狗凯之家源码网里查看原文

🛠️ 准备步骤

  1. 安装油猴插件
    • 访问官网:https://www.tampermonkey.net/
    • 按照指引为你的浏览器安装 Tampermonkey 插件
  2. 添加去水印脚本
    • 将文中提供的脚本代码复制,粘贴到油猴插件的 “新建脚本” 中
    • 保存后即可启用

✨ 核心优势

  • 精准去水印
    :针对每个平台的水印特征专属优化,能精准识别文字、logo、半透明水印,处理后高清无痕
  • 操作超简单
    :导入带水印素材 → 选择对应平台 → 点击运行,全程自动处理,无需手动修图
  • 全场景适配
    :支持 Windows /macOS 系统,可单张或批量处理素材,满足自媒体、电商运营、设计师日常商用需求
  • 长期免费更新
    :脚本会持续跟进平台水印更新,算法不断优化,一次获取终身使用,性价比远超付费工具
原理就是拦截网页中的水印
// ==UserScript==// @name         去除水印(新)// ==/UserScript==(function () {    'use strict';    // 按钮样式    const buttonStyle = `        position: fixed; top: 10px; left: 50%; transform: translateX(40%);        width: 80px; height: 40px; background: linear-gradient(90deg, rgb(255 102 68), rgb(255 102 68));        border-radius: 5px; color: #7a4806; font-size: 14px; font-weight: 500;        text-align: center; cursor: pointer; z-index: 99999;        box-shadow: 0 0 4px rgba(0,0,0,0.15); border: none; outline: none;    `;    // 添加去水印按钮    function addButton() {        const button = document.createElement('button');        button.textContent = '去水印';        button.style.cssText = buttonStyle;        button.addEventListener('click', removeWatermark);        document.body.appendChild(button);    }    // 拦截 SVG 水印    function interceptSvgWatermark(prototype, svgBase64) {        const originalSetSrc = Object.getOwnPropertyDescriptor(prototype, 'src').set;        Object.defineProperty(prototype, 'src', {            set(value) {                if (value.startsWith(svgBase64)) {                    console.log('Intercepted SVG:', value);                    return;                }                originalSetSrc.call(this, value);            }        });    }    function removeWatermark() {        const host = window.location.hostname;        if (host.includes('58pic') || host.includes('ibaotu') || host.includes('tusij')) {            document.querySelectorAll('.image-watermark').forEach(element => element.remove());        }        else if (host.includes('gaoding.com')) {            interceptSvgWatermark(HTMLImageElement.prototype, 'data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjMwMCIgaGVpZ');            const originalCreateObjectURL = URL.createObjectURL;                URL.createObjectURL = function(blob) {                    if (blob && blob.type === 'image/svg+xml') {                        console.log('Blocked SVG blob:', blob);                        return ''; // 返回空字符串,阻止加载                    }                    return originalCreateObjectURL.call(this, blob);                };        }        else if (host.includes('818ps.com')) {            interceptSvgWatermark(HTMLImageElement.prototype, 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy');        }        else if (host.includes('chuangkit')) {            document.querySelector('.remove-cktTemplate-watermark')?.remove();            const canvasSlotItem = document.querySelector('.canvas-slot-item');            if (canvasSlotItem) {                canvasSlotItem.style.zIndex = '99999';                canvasSlotItem.style.position = 'absolute';            }        }        else if (host.includes('bigesj')) {            document.querySelectorAll('.water, .water-tip').forEach(element => element.remove());        }        else if (host.includes('molishe')) {            // sc-cSiAOC gFbDaS  .fyzzoy            const elements = document.querySelectorAll('div.sc-cSiAOC');            elements.forEach(element => {                element.remove(); // 移除元素            });        }        else if (host.includes('51miz')) {            const iframe = document.getElementById('editor-online');            if (iframe) {                const iframeSrc = iframe.src;                window.open(iframeSrc, '_self');            } else {                console.warn('未找到 id 为 editor-online 的 iframe');            }        }    }    if (window.location.href.includes('gaoding.com') || window.location.href.includes('818ps.com')) {        removeWatermark();    } else {        window.addEventListener('load', addButton);    }})();
示范图:

最新文章

随机文章