素材网去水印

去除素材网的水印。目前支持图怪兽、千图网、创客贴、稿定设计、比格设计。

// ==UserScript==
// @name         素材网去水印
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  去除素材网的水印。目前支持图怪兽、千图网、创客贴、稿定设计、比格设计。
// @author       cangming99
// @match        https://ue.818ps.com/*
// @match        https://ecommerce.818ps.com/*
// @match        https://designer-ue.58pic.com/*
// @match        https://www.gaoding.com/editor/*
// @match        https://beta.chuangkit.com/odyssey/design*
// @match        https://bigesj.com/bill/*
// @icon         data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAACftJREFUeF7tWwmQVOUR/t4x1x6AIqIgSCRcUYxcylUGDRoUMCYxonIUl4KQ5QjIEZdIAaIoETYgIBQCESEQhHBZyEJhBBUkRILIGe4NCMi5MzvXO1L9z+7svHkzu71sZgtku2pqd970+7v/7/3dfx//kwDgygtdGkiS8SaAjgCq0LUfMF0FsMk05TFVl6w7LF3t0akRTHk7gGo/4EknmtplSEZr6Wr3Jz8C8OubbPJF011JAFy5CZZ9kucreQkA8yZ9+mLalQBUroBKEyiHD1BUOB5qD6RnQBKfTEguNyRPGuB0QHJ5AI8HkBVIqgq43BG7S0sHJCnqeiS3G1BUmysyC3yAWeiiAn6Yug7oGsxAAPD7YAaDQDAA4jO9+TB9+TC9XuhHD8E4dZzl2srlA6Qq1ZAx60OWoIpkCq39G4LLFrJElgsAuUZNpE97nyWoIplCn6xB8IP3WCLLBYCUkYmMOX9lCapIpvCm9QgsnMUSWS4ASILasg2gKMmF+XwwERNq+HxA4XczHAZCQfu9KvkPV+S6rET8CPkOpwtwOCCpDoB+l2RIaWlQ728JpUnT6DjhbZsRmPNOxQDAkpJiJle33nB2/W0xAF98isCst1lSy70CWFIKmZT6jeAZlo3QuhUIbVxT7OHLMkgC3ngAtH/tgP+dCaxRWQAQuvJtt4slZ1w4h9D6jwBNYwkoYpJr1kLaa1MhVakqLoVy1yK4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8mSNhUqnya6RfCP6ixZaMkp5d1i5pyHSJkyzAjC0Nz+klSQRxlJ4TFEclcfYjRHDEOWt+DpirDIpPx9AjQsKYWPJN7yviNiuiRQFFDwp9RtCqfdj0Rih7xTqxpPOaHXbANixFf4Z9PpD6cQyAQpgqD1mAYDbIi9dhygHZX6UGku31hDVZfroRw8Lh1kSxQMQpqLq3OksySwAaAujMwIWALKHwDh+hCUk1Uw2AHLXgbpJHGIBQMdYMxdZ21u0xIxjhzkykvPIcuRYbTnJ8VhXEWsUEXWjgisWs0blAQAgc+FqgM773gBUln4kG4CM95YldFLXIx6JmrfJ9GQDEH9G4HqceJFO/jezoe39mqUiGwB33yzIt98BkM2S7cYceRfHWun4ajIqq63ruvWckKYVR51aOHJMnvqLYfo/EPmNjtPTsVy/T/QSuIkUGwAWnDcgUyUAle8MVb4zVPni5E3+6uzzXRtD1r+8KV+eNpQ24t21wjfIJwN4jKLeG3A3K4vKdOoiF5LxhyqLNxz8H6SR72iv7BUIAAAAAElFTkSuQmCC
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // 创建按钮样式
    const buttonStyle = `
        --as-text-color-secondary: #909399;
        --as-horizontal-height: $height;
        --as-primary-color: #1890ff;
        --as-bg-color: #ffffff;
        --as-primary-text-color: #606266;
        --as-secondary-background-color: #f5f7fa;
        --as-border-color: #e8e8e8;
        border-width: 0px;
        pointer-events: auto;
        margin: 0;
        padding: 0;
        user-select: none;
        text-decoration: none;
        color: #7a4806;
        cursor: pointer;
        font-family: PingFangSC-Medium, PingFang SC;
        font-size: 14px;
        font-weight: 500;
        height: 40px;
        line-height: 40px;
        position: absolute;
        text-align: center;
        background: linear-gradient(90deg, #fdf6e4, #eddeb7);
        border-radius: 5px 5px 5px 5px;
        bottom: 110px;
        box-shadow: 0 0 4px 0 #00000026;
        box-sizing: border-box;
        left: 40%;
        transform: none;
        width: 80px;
        z-index: 99999;
        top: 10px;
        display: inline-block;
    `;

    function addButton() {
        // 创建按钮
        const button = document.createElement('button');
        button.innerHTML = '去水印';
        button.style.cssText = buttonStyle;

        // 将按钮添加到页面
        document.body.appendChild(button);

        // 点击按钮后执行隐藏水印的操作
        button.addEventListener('click', removeWatermark);
    }

    function removeWatermark() {
        // 图怪兽和千图网直接移除水印元素
        if (window.location.href.includes('818ps') || window.location.href.includes('58pic')) {
            document.querySelectorAll('.image-watermark').forEach(element => element.remove());
        }
        // 稿定设计将图层置顶,覆盖水印
        else if (window.location.href.includes('gaoding.com/editor/')) {
            document.querySelectorAll('.editor-element, .editor-background').forEach(element => element.style.zIndex = '99999');
        }
        // 创客贴去除多余按钮,将图层置顶,覆盖水印
        else if (window.location.href.includes('beta.chuangkit.com/odyssey/design')) {
            // 移除去水印按钮
            const removeButton = document.querySelector('.remove-cktTemplate-watermark');
            if (removeButton) {
                removeButton.remove();
            }
            // 置顶图层
            const canvasSlotItem = document.querySelector('.canvas-slot-item');
            if (canvasSlotItem) {
                canvasSlotItem.style.zIndex = '99999';
                canvasSlotItem.style.position = 'absolute';
            }
        }
        // 比格设计,直接移除水印和按钮
        else if (window.location.href.includes('bigesj.com/bill/')){
            document.querySelectorAll('.water').forEach(element => element.remove());
            document.querySelectorAll('.water-tip').forEach(element => element.remove());
        }
    }

    window.addEventListener('load', addButton);
})();