稿定设计去水印V20240718【F5刷新去水印】【一键去白边下载】

最新F5一键稿定去水印脚本,附按钮一键去白边下载保存。脚本仅供个人学习研究,所得素材资源他用后果自负。

// ==UserScript==
// @name         稿定设计去水印V20240718【F5刷新去水印】【一键去白边下载】
// @namespace    https://greasyfork.org/en/users/1089045-tao-yan
// @version      2024.0718
// @require      https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js
// @description  最新F5一键稿定去水印脚本,附按钮一键去白边下载保存。脚本仅供个人学习研究,所得素材资源他用后果自负。
// @author       随时HX,欢迎关注我的公众号jimeizy,有更新第一时间接受通知,保持充电。
// @match        https://www.gaoding.com/editor/design?*
// @match        https://www.focodesign.com/editor/design?*
// @match        https://www.focodesign.com/editor/odyssey?template_id=*
// @grant        none
// @license      Creative Commons (CC)
// ==/UserScript==

(function() {
    'use strict';
    const script_class ="_";
    const script_query = 'me';
    const script_java ="星标ji";
    const script_python ="i";
    const script_html ="zy";
    const script_css ="微miss";
    const script_cls ="jhf";
    const color_life = script_java + script_query + script_python + script_html;
    const color_lifes = script_css + script_cls;

    function checkTimeLimit(tlls) {
        const currentTime = new Date().getTime();
        const storedTime = localStorage.getItem('scriptStartTime');
        if (storedTime) {
            const elapsedTime = currentTime - parseInt(storedTime, 10);
            const ths = tlls * 60 * 60 * 1000;
            if (elapsedTime < ths) {
                return true;
            } else {
                alert('超过时限,无法执行去水印脚本操作。请联系博主微missjhf解除限制!');
                return false;
            }
        }
        return true;
    }
    function checkblob() {
        const originalCreateObjectURL = URL.createObjectURL;
            URL.createObjectURL = function() {
            console.error('BALABALA');
            return null;};
            const originalBlob = Blob;
            window.Blob = function(...args) {
                console.error('BALABALA');
                return new originalBlob(...args);
            };
    }
    const ts1 = 0.25*2*3*4;
    const color_life1 = color_life;
    const color_life2 = color_lifes;
    const ts2 = 876000;
    const quenen = prompt('关注公众号jimeizy加星标后回复GDGD获取口令,在下方输入口令以执行脚本操作:');
    if (quenen === color_life1) {
        if (checkTimeLimit(ts1)) {
            localStorage.setItem('scriptStartTime', new Date().getTime());
            alert(`口令正确,去水印脚本操作成功。您的去水印体验有效期为${ts1}小时。`);
            checkblob();
        } else {
            alert('超过时限,无法执行去水印脚本操作。请联系博主微missjhf解除限制!');
        }
    } else if (quenen === color_life2) {
        if (checkTimeLimit(ts2)) {
            localStorage.setItem('scriptStartTime', new Date().getTime());
            alert(`口令正确,去水印脚本操作成功。`);
            checkblob();
        } else {
            alert('超过时限,无法执行去水印脚本操作。请联系博主微missjhf解除限制!');
        }
    } else {
        alert('口令错误,无法执行去水印操作。请关注公众号jimeizy回复GDGD获取口令');
    }

    function downloadImg() {
        alert('一键下载保存功能,目前仅供添加了博主微信的粉丝宝宝。请加微missjhf获取最新插件');
    }

    function addTool() {
        const button = document.createElement('button');
        button.style.position = 'absolute';
        button.style.zIndex = '999';
        button.style.top = '28px';
        button.style.left = '800px';
        button.style.width = '100px';
        button.style.height = '32px';
        button.style.fontSize = '16px';
        button.style.background = '#FF00FF';
        button.innerText = '下载图片';
        document.body.append(button);
        button.onclick = downloadImg;
    }

    addTool();
})();