稿定设计|创客贴模板去水印

用于稿定设计|创客贴去除模板水印

// ==UserScript==
// @name         稿定设计|创客贴模板去水印
// @namespace    https://www.qyccc.com/
// @version      0.11
// @description  用于稿定设计|创客贴去除模板水印
// @author       清语尘
// @match        *://*.chuangkit.com/*
// @match        *://*.gaoding.com/*
// @require      https://lib.baomitu.com/jquery/1.11.1/jquery.min.js
// @require      https://gf.qytechs.cn/scripts/455943-ajaxhooker/code/ajaxHooker.js?version=1124435
// @require      https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/limonte-sweetalert2/11.4.4/sweetalert2.all.min.js
// @icon         https://photogallery.oss-cn-hangzhou.aliyuncs.com/photo/1111552255990557/53220d76cb7fa499a4bcd8b9717e9c7addf89.去水印.png
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    $(() => {
        const currentDomain = window.location.hostname;
        // 创客贴
        if (currentDomain === 'chuangkit.com' || currentDomain.endsWith('.chuangkit.com')) {
            if (document.readyState === 'complete') {
                cktFunc();
            }
            else {
                window.addEventListener('load', cktFunc);
                document.addEventListener('DOMContentLoaded', cktFunc);
            }
            return;
        }

        // 稿定
        if (currentDomain === 'gaoding.com' || currentDomain.endsWith('.gaoding.com')) {
            gdFunc();
            setTimeout(() => {
                qycNotify("center","success","温馨提示","去除水印成功,请手动截图保存!")
            },3000);
            return;
        }

        function cktFunc() {
            var qycbtn = '<div id="qycbtn" style="position:fixed;top:12px;right:39%;background:#0773fc;color:#fff;padding:6px 12px;border-radius:6px;cursor:pointer">去水印</div>';
            $('.design-header-box').append(qycbtn);
            $('#qycbtn').on('click',function(){
                if($('.remove-cktTemplate-watermark').length == 0){
                    qycNotify("center","info","温馨提示","水印已经去除成功啦,请勿重复点击!")
                }else{
                    $('.remove-cktTemplate-watermark').remove();
                    $('.canvas .water-mark').removeAttr("class").removeAttr("style").attr('aastyle');
                    qycNotify("center","success","温馨提示","去除水印成功,请手动截图保存!")
                }
            })
        }
        function gdFunc() {
            ajaxHooker.hook(request => {
                if (request.url.endsWith('/api/ccm/editors/risk_materials')) {
                    request.response = res => {
                        JSON.parse(res.responseText);
                    };
                }
            });
        }
        // 通知
        function qycNotify(position,icon,title,text){
            Swal.fire({
                position: position,
                icon: icon,
                title: title,
                text: text,
                imageUrl: "https://www.pupp.top/gzh.jpg",
                imageWidth: 200,
                imageAlt: "微信公众号【干货老周】"
            });
        }
    })
})();

QingJ © 2025

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