Greasy Fork is available in English.

Kill Watermark

支持去除图怪兽、易企秀、创客贴、比格设计、稿定设计、爱设计图片水印

// ==UserScript==
// @name         Kill Watermark
// @namespace    https://greasyfork.org/zh-CN/users/753623-achengovo
// @version      2.6
// @description  支持去除图怪兽、易企秀、创客贴、比格设计、稿定设计、爱设计图片水印
// @author       阿成
// @icon         https://achengovo.com/greasyfork/logo.png
// @match        https://*.818ps.com/*
// @match        https://*.eqxiu.com/*
// @match        https://*.chuangkit.com/*
// @match        https://bigesj.com/*
// @match        https://*.gaoding.com/*
// @match        https://www.isheji.com/*
// @require      https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js
// @grant        unsafeWindow
// ==/UserScript==
(function( $ ) {
    //弹窗配置
    var config={
        showDonate:true,//是否显示弹窗,true为显示,false为不显示,默认显示
        donateDays:2,//弹窗显示频率,每几天一次,默认2天一次

    }
    init([]);
    newOutBtn("kill","去除水印",kill)
    var tit=document.title;
    if (/(图怪兽)/.test(tit)) {
        newOutBtn("ziti","字体问题",()=>{
            $(".image-watermark").remove()})
    }
    if(config.showDonate){
        donate()
    }

    function kill(){
        var tit=document.title;
        if (/(图怪兽)/.test(tit)) {
            $(".image-watermark").remove()
            let oldStr = window.document.body.innerHTML;
            var newStr=document.getElementsByClassName("canvasContent")[0].innerHTML
            window.document.body.innerHTML = newStr;
            $(".footCreateBlankCanvas").remove();
            $("body").css("overflow","auto")
            $("div").remove(".image-watermark");
            $(".fixedWaterMaskButton").remove();
        }else if (/(易企秀)/.test(tit)) {
            $("div.eqc-watermark").css("position",'static');
            $(".eqc-wm-close").remove();
            let oldStr = window.document.body.innerHTML;
            var newStr=document.getElementsByClassName("safe-space")[0].innerHTML
            newStr=newStr.replaceAll('data-hint="双击或从素材库拖拽进行替换"','')
            newStr=newStr.replaceAll("hint--top","")
            window.document.body.innerHTML = newStr;
            $("body").css("overflow","auto");
            var timename=setTimeout(function print(){
                $(".eqc-editor").css("transform","none");
                $("#eqc-mouse-info").css("display","none");
            },500);
        }else if (/(创客贴)/.test(tit)) {
            $("div[style*='ckt-watermark']").remove();
            var newStr=document.getElementsByClassName("canvas-slot-inner")[0].innerHTML
            window.document.body.innerHTML = newStr;
            $("body").css("overflow","visible")
        }else if (/(金山)/.test(tit)) {
            var newStr=document.getElementsByClassName("canvas_slot_item")[0].innerHTML
            window.document.body.innerHTML = newStr;
        }else if (/(比格设计)/.test(tit)) {
            $("div.water").css("position",'static');
            $("div.tool-bar-container").remove();
            $(".water-tip").remove();
            let oldStr1 = window.document.body.innerHTML;
            var newStr=document.getElementsByClassName("bige-canvas-list")[0].innerHTML
            window.document.body.innerHTML = newStr;
        }else if (/(稿定设计)/.test(tit)) {
            var nowUrl=window.location.href;
            if(!/(qiye.)/.test(nowUrl)){
                alert("浏览器网址前加上qiye.切换到企业版本去水印效果更好")
            }
            $(".header-container").remove()
            $(".resource-station").remove()
            $(".right-panel").remove()
            $(".editor-container").css("position","inherit");
            var gaoding = document.createElement('style');
            gaoding.innerHTML=".editor-watermark{position: static;z-index:-999 !important;"
            window.document.body.append(gaoding)
            $("body").prepend(gaoding);
            $(".editor-watermark").css("opacity","0");
            $(".editor-watermark").css("display","none");
            $(".main__bottom").remove()
        }else if (/(爱设计)/.test(tit)) {
            $("#editorDrag > div.undefined.scrolly > div.scrolly-viewport.editor-center > div > div:nth-child(1)").remove();
            $(".editor-watermask").remove();
            $(".editor-header").remove();
            $(".editor-aside").remove();
            $(".editor-panel").remove();
            $("#rongqi").remove();
            $("#outbuttons").remove();
        }
    }
    function donate(){
        var today= new Date().toLocaleDateString()
        console.log("cookie"+readCookie("killtoday"))
        if (readCookie("killtoday") != "") {
            return;
        }
        var expire = new Date();
        expire.setTime(expire.getTime() + 3600000 * 24*config.donateDays);
        document.cookie = "killtoday" + "=" + escape(today) + ";expires=" + expire.toGMTString()+";path=/";

        var modal = document.createElement('div');
        modal.style.maxWidth='400px';
        modal.style.maxHeight='600px';
        modal.style.height='100%';
        modal.style.width='100%';
        modal.style.zIndex='1000000';
        modal.style.position = 'fixed';
        modal.style.top = '50%';
        modal.style.left = '50%';
        modal.style.transform = 'translate(-50%, -50%)';
        modal.style.backgroundColor = 'rgba(70, 196, 38, 1)';
        modal.style.padding = '20px';
        modal.style.boxShadow = '0px 0px 10px rgba(0,0,0,0.3)';

        var title = document.createElement('h2');
        title.style.textAlign = 'center';
        title.style.marginBottom = '10px';
        title.style.color='red';
        title.innerText = '支持作者';
        modal.appendChild(title);

        var image = document.createElement('img');
        image.style.display = 'block';
        image.style.margin = '0 auto';
        image.style.maxWidth = '100%';
        image.style.height = 'auto';
        image.style.marginTop = '20px';
        image.src = 'http://achengovo.com/greasyfork/pay.png';
        modal.appendChild(image);

        var closeButton = document.createElement('button');
        closeButton.style.width='100%';
        closeButton.style.height='40px';
        closeButton.style.margin='20px auto 0px';
        closeButton.style.backgroundColor='green';
        closeButton.style.display='block';
        closeButton.textContent='已经支持';
        closeButton.style.color='red';
        closeButton.style.fontSize='20px';
        closeButton.addEventListener('click',()=>{
            alert("万分感谢");
            modal.remove();
        });
        modal.appendChild(closeButton);

        var freeButton = document.createElement('button');
        freeButton.style.width='100%';
        freeButton.style.height='40px';
        freeButton.style.margin='20px auto 0px';
        freeButton.style.backgroundColor='green';
        freeButton.style.display='block';
        freeButton.textContent='老子就要白嫖';
        freeButton.style.fontSize='20px';
        freeButton.style.color='red';
        freeButton.addEventListener('click',()=>{
            modal.remove();
        });
        modal.appendChild(freeButton);

        var tips=document.createElement('p');
        tips.style.color='red';
        tips.style.marginTop='10px';
        tips.style.marginBottom='0px';
        tips.textContent='捐赠时备注名称可展示在致谢列表(以前捐赠过的可以加下方QQ群联系作者添加致谢名单)';
        modal.appendChild(tips);

        var tips2=document.createElement('p');
        tips2.style.color='red';
        tips2.style.marginTop='5px';
        tips2.style.marginBottom='0px';
        tips2.textContent='QQ交流群:595338626';
        modal.appendChild(tips2);

        var thanksTitle=document.createElement('h3');
        thanksTitle.style.textAlign = 'center';
        thanksTitle.style.color='red';
        thanksTitle.style.fontSize='18px';
        thanksTitle.innerText = '致谢';
        modal.appendChild(thanksTitle);

        var thanks=document.createElement('p');
        thanks.style.color='red';
        thanks.style.marginTop='5px';
        thanks.textContent='我在东北玩泥巴、可乐猫、#、荷包有限、小媚子';
        modal.appendChild(thanks);

        document.body.appendChild(modal);
    }
})( jQuery );
function newOutBtn(id,text,fun){
    $("#outbuttons").append( "<button class='mybutton' id='"+id+"' style='float:left;background-color: rgba(70, 196, 38, 0.6); width: 70px;height: 30px;font-size: 12px;color:red;'>"+text+"</button>");
    $("#"+id+"").click(fun)
}
function init(data){
    var outbuttons="<div id='outbuttons' style='font-size: 12px;background-color: rgba(70, 196, 38, 0.6); position: fixed; top: 0; left: 0; z-index: 99999;'>"
    +"</div>"
    $("body").prepend(outbuttons);
    var tit=document.title;
    for(var i=0;i<data.length;i++){
        var reg=new RegExp("("+data[i][0]+")")
        if(reg.test(tit)){
            data[i][1]();
        }
    }
}

function readCookie(cookieName) {
    var theCookie = "" + document.cookie;
    var ind = theCookie.indexOf(cookieName);
    if (ind == -1 || cookieName == "") return "";
    var ind1 = theCookie.indexOf(';', ind);
    if (ind1 == -1) ind1 = theCookie.length;
    return unescape(theCookie.substring(ind + cookieName.length + 1, ind1));
}