Greasy Fork

Greasy Fork is available in English.

畅玩4399

4399去未成年和登录限制弹窗,目前仅限h5小游戏

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         畅玩4399
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  4399去未成年和登录限制弹窗,目前仅限h5小游戏
// @author       毅
// @match        *://*.4399.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @require           https://cdn.bootcdn.net/ajax/libs/jquery/3.2.1/jquery.min.js
// @license           GPL License
// ==/UserScript==

(function() {
    'use strict';
    window.onload = function(){
        $('#bigdiv').append(`
        <p style="position:absolute;top:150px;left:10px;width:150px;">破解未成年防沉迷脚本已启用,
        部分游戏任在破解中,开发者:小易
        </p>
        document.domain="4399.com";
        var gameid = parseInt(document.location.href.split("?")[1].replace("id=",""));
        $.getScript("/age/"+gameid+".js",function(res,status){
            if(status=="success"){
                $(".ageGame").html(age__cxn);
                $(".diaText").html(age__str);
                $(".ageTip").html('<img src="'+age__ageimg+'"/>');
            }
        });
        `);
        /*
                $('#bigdiv').append(`
        <button style="position:absolute;top:150px;left:10px;">edge切换IE</button>
        <script>
          window.onload = function(){
           }
        </script>
        `);
        */
        $('#Anti_mask').after(`
        <script>
          function a(){
            // 去除防未成年弹框
            $('#Anti_mask')[0].style.display = 'none';
            $('.fcmdialog')[0].style.display = 'none';
            
            // 如果有 pusher
            if($('#pusher')) {
                $('#pusher')[0].style.display = 'none';
            }
            // 如果发现就删除
            var myInterval = setInterval(()=>{
                if($('#ageIframes') && $('#ageIframes')[0] ) {
                    $('#ageIframes')[0].style.display = 'none';
                    $('#addiv')[0].style.display = 'none';
                    $('#pusher')[0].style.display = 'none';
                    clearInterval(myInterval);
                }
            },1000);
         }
        a();
        </script>
        `)
    }
})();