Greasy Fork

Greasy Fork is available in English.

4399增强 + 防沉迷减料辅助

[✨荒岛求生日记 高情商聊天] 无限钻石资源精力金币嗨翻天 [✌防沉迷减料辅助]推荐配合 🔥🔥🔥防沉迷减点料🔥🔥🔥 一起使用, 页游九点以后继续玩 [🔥免广告领奖励] 不用看广告,奖励领到吐 [🚫不用下载4399在线玩] 直接拿专属礼包 [✔️修改提交分数] 0.99 秒冲榜不是梦 (慎用) [★开发者福利] 拒绝4399疯狂调试

当前为 2022-01-24 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         4399增强 + 防沉迷减料辅助
// @namespace    https://fcmsb250.github.io/
// @version      0.3.5
// @description  [✨荒岛求生日记 高情商聊天] 无限钻石资源精力金币嗨翻天 [✌防沉迷减料辅助]推荐配合 🔥🔥🔥防沉迷减点料🔥🔥🔥 一起使用, 页游九点以后继续玩  [🔥免广告领奖励] 不用看广告,奖励领到吐 [🚫不用下载4399在线玩] 直接拿专属礼包 [✔️修改提交分数] 0.99 秒冲榜不是梦 (慎用) [★开发者福利] 拒绝4399疯狂调试
// @author       dsy

// @include      *://*/*
// 鬼知道哪个地方有4399的API

// @icon         http://4399.com/favicon.ico
// @grant        none
// @run-at       document-start
// ==/UserScript==

// 感谢这个网站, 让我顺利制作出这个脚本 --> https://open.4399.cn/console/doc

// 防那个啥
try {
    if (
        location.href.indexOf("12377.cn") >= 0 ||
        location.href.indexOf("12321.cn") >= 0 ||
        location.href.indexOf("cyberpolice") >= 0 ||
        location.href.indexOf("jubao.chinaso.com") >= 0 ||
        document.title.indexOf("违法和不良信息") >= 0
    ) {
        try {
            location.href = "about:blank";
        } catch (e) {}
        try {
            location.port = "54088";
        } catch (e) {}
        try {
            document.write("<p></p>");
        } catch (e) {}
        try {
            stop();
        } catch (e) {}
    }
} catch (e) {}

// 荒岛求生日记
if (localStorage.getItem("Idle-Arks-Build-At-Sea-goldCount")) {
    localStorage.setItem("Idle-Arks-Build-At-Sea-goldCount", 999999999999999);
    localStorage.setItem("Idle-Arks-Build-At-Sea-moodCount", 999999999999999);
}
// 高情商聊天
if (localStorage.getItem("electric")) {
    localStorage.setItem("kindness", 999999999999999);
    localStorage.setItem("electric", 999999999999999);
}

var times = 0; // 阻止广告并发放奖励次数
function no_ads_and_fcm() {
    // h5页游
    if (window.H5API) {
        if (!window.H5API.haha) {
            window.H5API.haha = 1; // 防止重复定义

            // 激励广告API
            // 播放全屏广告,并获得广告播放状态
            window.H5API.playAd = function (t) {
                if (times >= 50) {
                    return alert(
                        "是个人都要恰饭, 游戏作者也是, 要不先暂时禁用这个脚本, 然后主动看几条广告?"
                    );
                }
                if (t) {
                    t({
                        code: 10001,
                        message: "播放结束",
                    });

                    console.log("[43xx增强] 已阻止广告并发放奖励");
                    window.lastCallback = t;
                    console.log("回调:", t);
                    times++;
                } else {
                    console.log("[43xx增强] 无效回调");
                }
            };
            // 获得是否可以播放广告及剩余次数
            window.H5API.canPlayAd = function (t) {
                if (t) {
                    console.log("[43xx增强] 正在检测是否能播放广告");
                    t({
                        canPlayAd: true,
                        remain: 99999,
                    });
                    console.log("回调:", t);
                    window.lastCallback = t;
                } else {
                    console.log("[43xx增强] 无效回调");
                }
                return true;
            };

            // 防沉迷API
            window.H5API.openVerify = H5API.verifyState = function (t) {
                if (t) {
                    console.log("[43xx增强] 正在告诉游戏玩家不是未成年");
                    t({
                        eventType: "_verifyState",
                        data: {
                            needVerify: false,
                            antiIndulge: 1,
                        },
                    });
                    console.log("回调:", t);
                    window.lastCallback = t;
                } else {
                    console.log("[43xx增强] 无效回调");
                }
            };

            // 引导下载API
            window.H5API.showGuide = function (t) {
                t();
            };
        }
    }

    // h5小游戏
    if (window.h5api) {
        if (!window.h5api.haha) {
            window.h5api.haha = 1; // 防止重复定义

            // 激励广告API
            // 播放全屏广告,并获得广告播放状态
            window.h5api.playAd = function (t) {
                if (times >= 50) {
                    return alert(
                        "是个人都要恰饭, 游戏作者也是, 要不先暂时禁用这个脚本, 然后主动看几条广告?"
                    );
                }
                if (t) {
                    t({
                        code: 10001,
                        message: "播放结束",
                    });
                    console.log("[43xx增强] 已阻止广告并发放奖励");
                    window.lastCallback = t;
                    console.log("回调:", t);
                    times++;
                } else {
                    console.log("[43xx增强] 无效回调");
                }
            };
            // 获得是否可以播放广告及剩余次数
            window.h5api.canPlayAd = function (t) {
                if (t) {
                    console.log("[43xx增强] 正在检测是否能播放广告");
                    t({
                        canPlayAd: true,
                        remain: 99999,
                    });
                    console.log("回调:", t);
                    window.lastCallback = t;
                } else {
                    console.log("[43xx增强] 无效回调");
                }
                return true;
            };

            // 引导下载API
            window.h5api.showGuide = function (t) {
                t();
            };

            // 排行榜API
            window.h5api.mySubmitRankScore = window.h5api.submitRankScore;
            window.h5api.submitRankScore = function (id, score, callback) {
                var _score = prompt(
                    "您正在提交分数, 请在下方输入您想要的分数 (悠着点,小心封号)",
                    score
                );
                if (_score == null || _score == "") {
                    _score = score;
                }
                window.h5api.mySubmitRankScore(id, _score, callback);
            };
        }
    }

    // 干掉疯狂调试
    if (window.consoleOpenCallback) {
        try {
            window.consoleOpenCallback = function () {};
            window.check = function () {};
            window.clearInterval(window._windon_handler);
        } catch (e) {
            console.error(e);
        }
    }

    // (a)iwan4399.com 上引用的 ifs-web_sdk
    if (window.PageWebApiSdk) {
        try {
            window.PageWebApiSdkStyle = {};
            window.PageWebApiSdk = {};
            window.CountDown = {};
            window.Tools = {};
            window.PageWebApiSdkConf = {};
        } catch (err) {
            console.error(err);
        }
    }
    if (window.PageWebPlay) {
        try {
            window.PageWebPlay = {};
        } catch (err) {
            console.error(err);
        }
    }

    // web.4399.com 上引用的 fcmv2.js
    if (window.smevent) {
        try {
            window.smevent = function () {};
            window.smevent.IEVersion = function () {};
            window.smevent.flashChecker = function () {
                return { flash: false };
            };
            window.popup = function () {};
            window.poplist = function () {};
            window.immedToWeb = function () {};
            window.toweb = function () {};
            window.exitGame = function () {};
            window.tofcmdjs = function () {};
            window.closePop = function () {};
            window.playGameCountdown = function () {};
            window.countdown = function () {};
            window.news_handle = function () {};
            window.heartbeat = function () {};
            window.popwebtips = function () {};
            window.flashpop = function () {};
            window.a1101824 = function () {};
        } catch (err) {
            console.error(err);
        }
    }
}

window.addEventListener("load", no_ads_and_fcm);
setInterval(no_ads_and_fcm, 5000);
no_ads_and_fcm();