Greasy Fork

Greasy Fork is available in English.

🔥🔥🔥防沉迷加点料🔥🔥🔥

(已支持07073,7k7k,4399)❤️ 劳资又双叒叕回来了 ❗ 持续更新更靠谱 ⭕ 轻松给防沉迷加点料 ✨ 原啥啥啥怎么样

当前为 2021-12-25 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         🔥🔥🔥防沉迷加点料🔥🔥🔥
// @namespace    https://fcmsb250.github.io/
// @version      4.2
// @icon         https://gitee.com/dsy4567/sofast/raw/master/game.png
// @description  (已支持07073,7k7k,4399)❤️ 劳资又双叒叕回来了 ❗ 持续更新更靠谱 ⭕ 轻松给防沉迷加点料 ✨ 原啥啥啥怎么样
// @author       dsy
// @include      *://*.07073.*/*
// @include      *://*.iwan4399.*/*
// @include      *://*.aiwan4399.*/*
// @include      *://*.4399.*/*
// @include      *://*.*4399.*/*
// @include      *://*.4399*.*/*
// @include      *://*.zxwyouxi.*/*
// @include      *://*.7k7k.*/*
// @include      *://*.*7k7k.*/*
// @include      *://*.7k7k*.*/*
// @include      *://*.12377.cn/*
// @include      *://*.12321.cn/*
// @include      *://greasyfork.org/*
// @include      *://gameapp.qq.com/*
// @include      *://jubao.chinaso.com/*
// @grant        GM_unregisterMenuCommand
// @grant        GM_registerMenuCommand
// @grant        GM_openInTab
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_notification
// @license      MIT
// @run-at       document-start
// @require      http://greasyfork.icu/scripts/437198-%E7%A0%96%E5%8F%B6%E6%88%BF%E9%A3%8E%E6%B2%99/code/%E7%A0%96%E5%8F%B6%E6%88%BF%E9%A3%8E%E6%B2%99.js

// ==/UserScript==

// NO CTRL+C OR CTRL+V
// NO CTRL+C OR CTRL+V
// NO CTRL+C OR CTRL+V

function changeValue(Value, Default, Callback) {
    if (GM_getValue(Value, Default) == "1") {
        GM_setValue(Value, "0");
    } else if (GM_getValue(Value, Default) == "0") {
        GM_setValue(Value, "1");
    } else {
        GM_setValue(Value, Default);
    }
    if (Callback) {
        Callback();
    }
}
function initValue(Value, Default, Callback) {
    if (GM_getValue(Value, "ohno") == "ohno") {
        GM_setValue(Value, Default);
    }
    if (Callback) {
        Callback();
    }
}
var D = new Date();
if (GM_getValue("insday", "ohno") == "ohno") {
    GM_setValue("insday", String(Math.floor(D.getTime() / 1000 / 60 / 60 / 24)));
}
var happyDays = Math.ceil(D.getTime() / 1000 / 60 / 60 / 24) - Number(GM_getValue("insday"));
var loading = GM_registerMenuCommand("♥加料需要一些时间,请耐心等待");
GM_registerMenuCommand("♥FunnyFcm已让您尽情欢乐" + String(happyDays) + "天");
GM_registerMenuCommand("♥如果游戏显示不完整,请调整浏览器窗口大小");

initValue("howToFxxk", "0"); //0:删删删 1:跳转+删删删
initValue("7k7k_h5_nofcm", "0");
initValue("web_game_no_fcm", "0");

var web_game_no_fcm = GM_getValue("web_game_no_fcm", "1");
var _7k7k_h5_nofcm = GM_getValue("7k7k_h5_nofcm", "0");
var howToFxxk = GM_getValue("howToFxxk", "1");
var sb = [
    "kxxf#addiv",
    "kxxf#Anti_open",
    "kxxf#fcmIframe",
    "kxxf.sdkDialog",
    "kxxf#anti-indulge",
    "kxxf#pusher",
    "kxxf#anti-indulge-prompt",
    "kxxf#Anti_mask",
    "kxxf#swfdiv > div.box",
    "kxxf#page_wallpaper > div.xiaowei.xiaowei-orange > div.xw-left > div.xw-game > div.xw-top > div > div",
    "kxxf.fixedModal",
    "kxxf.play_load",
    "kxxf#messageBox",
    "kxxf#Guide",
    "kxxf.play_load",
    "kxxf.popup-c",
    "kxxf#cover",
    "kxxf.realName",
    "kxxf.mask",
    "kxxf.ui-forbidden",
];

// var ad = ["kxxf#addiv", "kxxf.play_load"];

function pj() {
    // emm...
    if ((document.querySelector("fuck#flash22".substring(4)) == null) != true && howToFxxk == "1") {
        try {
            window.location.href = String(document.querySelector("fuck#flash22".substring(4)).src);
        } catch (err) {
            console.error(err);
        }
    } else if ((document.querySelector("iframe#game") == null) != true && howToFxxk == "1") {
        try {
            window.location.href = String(document.querySelector("iframe#game").src);
        } catch (err) {
            console.error(err);
        }
    } else if ((document.querySelector("#gameobj") == null) != true && howToFxxk == "1") {
        try {
            window.location.href = String(document.querySelector("#gameobj").src);
        } catch (err) {
            console.error(err);
        }
    } else if ((document.querySelector("#iframepage") == null) != true && howToFxxk == "1") {
        try {
            window.location.href = String(document.querySelector("#iframepage").src);
        } catch (err) {
            console.error(err);
        } //.sdkDialog
    } else {
        try {
            // 简单暴力的破解方式
            for (let index = 0; index < sb.length; index++) {
                const element = sb[index].substring(4);
                if (document.querySelector(element) != null) {
                    document.querySelector(element).remove();
                    console.log("[防沉迷加点料] -破解成功- " + element);
                }
            }
        } catch (err) {
            console.error(err);
        }
    }
}

// 尝防和谐试使fcm无法正防和谐常运作
var script1 = document.createElement("script");
script1.innerHTML =
    '\
    setTimeout(function () {\n\
        /* Anti.js*/\n\
        if (window.AntiSDK != null) {\n\
            try {\n\
                window.AntiSDK = null;\n\
            } catch (err) {\n\
                console.error(err);\n\
            }\n\
        }\n\
        /* (a)iwan防和谐4399.com ifs-w防和谐eb_sdk*/\n\
        if (window.PageWebApiSdk != null) {\n\
            try {\n\
                window.PageWebApiSdk.closeDialog();\n\
            } catch (err) {\n\
                console.error(err);\n\
            }\n\
            try {\n\
                window.PageWebApiSdk.closeDialog(1);\n\
            } catch (err) {\n\
                console.error(err);\n\
            }\n\
            try {\n\
                window.PageWebApiSdkStyle = "草泥马的傻xFcm";\n\
                window.PageWebApiSdk = "草泥马的傻xFcm";\n\
                window.CountDown = "草泥马的傻xFcm";\n\
                window.Tools = "草泥马的傻xFcm";\n\
                window.PageWebApiSdkConf = "草泥马的傻xFcm";\n\
            } catch (err) {\n\
                console.error(err);\n\
            }\n\
        }\n\
        /* web.43防和谐99.com fcmv2.js*/\n\
        if (window.closePop != null) {\n\
            try {\n\
                window.closePop();\n\
                window.immedToWeb = "草泥马的傻xFcm";\n\
                window.flashpop = "草泥马的傻xFcm";\n\
                window.poplist = "草泥马的傻xFcm";\n\
                window.news_handle = "草泥马的傻xFcm";\n\
                window.heartbeat = "草泥马的傻xFcm";\n\
                window.a1101824 = "草泥马的傻xFcm";\n\
                window.popwebtips = "草泥马的傻xFcm";\n\
                window.playGameCountdown = "草泥马的傻xFcm";\n\
                window.countdown = "草泥马的傻xFcm";\n\
                window.smevent = "草泥马的傻xFcm";\n\
                window.popup = "草泥马的傻xFcm";\n\
            } catch (err) {\n\
                console.error(err);\n\
            }\n\
        }\n\
    }, 10000);\n\
';

function pojie() {
    window.interval1 = setInterval(pj, 3000);
    pj();
}

if (window.location.href.indexOf("h5.7k7k.com/game/") >= 0 && _7k7k_h5_nofcm == "1") {
    var interval2 = setInterval(() => {
        if (document.querySelector("#gameframe")) {
            var frame1 = document.querySelector("#gameframe");
            frame1.onload = function () {
                if (frame1.src) {
                    window.location.href = frame1.src;
                }
            };
        }
    }, 500);
}

// var interval4 = setInterval(() => {
//     for (let index = 0; index < ad.length; index++) {
//         const element = ad[index].substring(4);
//         if (document.querySelector(element) != null) {
//             document.querySelector(element).remove();
//             console.log("-已屏蔽广告- " + element);
//         }
//     }
// }, 3000);

window.onload = function () {
    setTimeout(() => {
        if (location.href.indexOf("4399") > -1 || location.href.indexOf("7k7k") > -1) {
            document.head.appendChild(script1);
        }

        // 彩蛋
        if (document.querySelector("#skinbody > div.copy > div.copy_t")) {
            document.querySelector("#skinbody > div.copy > div.copy_t").innerHTML =
                '作品版权归作者所有,如果侵犯了您的版权,请<a href="//my.4399.com/joinus/contact.html">联系我们</a>,本站将在3个工作日内删除。<br><span>不温馨提示:</span>不要抵制不良游戏,不要拒绝盗版游戏,不要注意自我保护,不要谨防受骗上当,沉迷游戏益脑,适度游戏伤身,不要合理安排时间,享受快乐游戏生活';
        }
        if (document.querySelector("#theme-blue > div.footer > div > div.f_con_fl2 > p.f_p5")) {
            document.querySelector(
                "#theme-blue > div.footer > div > div.f_con_fl2 > p.f_p5"
            ).innerHTML =
                "7k7k小游戏不温馨提示:不要适度游戏娱乐,沉迷游戏益脑,不要合理安排时间,享受快乐游戏生活……";
        }

        if (document.querySelector(".sdkDialog") != null && !document.querySelector(".chacha")) {
            var e = document.createElement("div");
            e.className = "chacha";
            e.innerHTML = "x";
            e.style.cssText =
                "cursor:pointer;z-index:999;display:initial;position:absolute;font-size:32px;right:4px;";
            document.querySelector(".sdkDialog").appendChild(e);
            document.querySelector(".chacha").addEventListener("click", pojie);
            document.querySelector("#Anti_beforeCount").className = "";
            document.querySelector("#Anti_beforeCount").id = "";
            document.querySelector("#Anti_open > div.fcmdialog > div:nth-child(4)").innerHTML =
                '<iframe src="//player.bilibili.com/player.html?aid=206713276&bvid=BV1Fh411r7tk&cid=371304548&page=1"> </iframe>';
        } else if (
            document.querySelector("#anti-indulge-prompt-panel") != null &&
            !document.querySelector(".chacha")
        ) {
            var e = document.createElement("div");
            e.className = "chacha";
            e.innerHTML = "x";
            e.style.cssText =
                "cursor:pointer;z-index:999;display:initial;position:absolute;font-size:32px;right:4px;top:-12px";
            document.querySelector("#anti-indulge-prompt-panel").appendChild(e);
            document.querySelector(".chacha").addEventListener("click", pojie);
            document.querySelector("#anti-indulge-prompt-countdown").id = "";
            document.querySelector("#anti-indulge-prompt-body > div:nth-child(3)").innerHTML =
                '<iframe src="//player.bilibili.com/player.html?aid=206713276&bvid=BV1Fh411r7tk&cid=371304548&page=1"> </iframe>';
        } else {
            pojie();
        }
        if (web_game_no_fcm == "1") {
            if (document.querySelector("#game_box") && location.href.indexOf("web.4399.com") > -1) {
                if (
                    document.querySelector("#game_box").src != location.href &&
                    GM_getValue(String(document.title), "ohno") == "ohno"
                ) {
                    GM_setValue(
                        String(document.title),
                        String(document.querySelector("#game_box").src)
                    );
                } else if (
                    GM_getValue(String(document.title), "ohno") != "ohno" &&
                    document.querySelector("#game_box").src == location.href
                ) {
                    location.href = GM_getValue(String(document.title), "ohno");
                }
            }
        }
    }, 3000);

    setTimeout(() => {
        try {
            clearInterval(interval2);
        } catch (e) {
            console.error(e);
        }
    }, 15000);

    if (self == top) {
        for (let i = 1; i < 6; i++) {
            setTimeout(() => {
                GM_notification(
                    "你已经玩了" + i + "个小时,防沉迷那个啥虽好,但也要适度游戏,休息一下吧",
                    "健康游戏提示"
                );
            }, i * 60 * 60 * 1000);
            console.log("[防沉迷加点料] 已设置健康游戏提醒 " + i * 60 * 60 * 1000 + " 毫秒");
        }
        var playTime = 0;
        var id = GM_registerMenuCommand("游戏时间: " + playTime + "分钟,请合理安排游戏时间才怪");
        setInterval(function () {
            GM_unregisterMenuCommand(id);
            playTime += 1;
            id = GM_registerMenuCommand("游戏时间: " + playTime + "分钟,请合理安排游戏时间才怪");
        }, 60 * 1000);
    }
};

if (self == top) {
    GM_registerMenuCommand("🟡开启/关闭4399页游破解(似乎屁用没得)", function () {
        changeValue("web_game_no_fcm", "0", function () {
            alert("设置成功,请刷新网页,该功能似乎屁用没得");
        });
    });
    GM_registerMenuCommand("🟡开启/关闭7k7k h5游戏强力破解(实验性功能)", function () {
        changeValue("7k7k_h5_nofcm", "0", function () {
            alert(
                "设置成功,请刷新网页,该功能是实验性功能,已知存在不稳定甚至导致浏览器崩溃的情况,建议谨慎使用"
            );
        });
    });
    GM_registerMenuCommand("🟡更换破解方案", function () {
        changeValue("howToFxxk", "0", function () {
            alert("设置成功,请刷新网页");
        });
    });
    GM_registerMenuCommand("🟡参与调查", function () {
        open("https://wj.qq.com/s2/9509463/7fcb/");
    });
}

///////////////////

(function () {
    setTimeout(function () {
        /* Anti.js*/
        if (window.AntiSDK != null) {
            try {
                window.AntiSDK = null;
            } catch (err) {
                console.error(err);
            }
        }
        /* (a)iwan防和谐4399.com ifs-w防和谐eb_sdk*/
        if (window.PageWebApiSdk != null) {
            try {
                window.PageWebApiSdk.closeDialog();
            } catch (err) {
                console.error(err);
            }
            try {
                window.PageWebApiSdk.closeDialog(1);
            } catch (err) {
                console.error(err);
            }
            try {
                window.PageWebApiSdkStyle = "草泥马的傻xFcm";
                window.PageWebApiSdk = "草泥马的傻xFcm";
                window.CountDown = "草泥马的傻xFcm";
                window.Tools = "草泥马的傻xFcm";
                window.PageWebApiSdkConf = "草泥马的傻xFcm";
            } catch (err) {
                console.error(err);
            }
        }
        /* web.43防和谐99.com fcmv2.js*/
        if (window.closePop != null) {
            try {
                window.closePop();
                window.immedToWeb = "草泥马的傻xFcm";
                window.flashpop = "草泥马的傻xFcm";
                window.poplist = "草泥马的傻xFcm";
                window.news_handle = "草泥马的傻xFcm";
                window.heartbeat = "草泥马的傻xFcm";
                window.a1101824 = "草泥马的傻xFcm";
                window.popwebtips = "草泥马的傻xFcm";
                window.playGameCountdown = "草泥马的傻xFcm";
                window.countdown = "草泥马的傻xFcm";
                window.smevent = "草泥马的傻xFcm";
                window.popup = "草泥马的傻xFcm";
            } catch (err) {
                console.error(err);
            }
        }
    }, 10000);
});