游侠下载免安装提示

2022/6/11 16:31:10

// ==UserScript==
// @name        游侠下载免安装提示
// @namespace   Violentmonkey Scripts
// @match       https://down.ali213.net/pcgame/
// @match       https://down.ali213.net/pcgame/all/*
// @grant       none
// @version     1.1
// @author      -
// @description 2022/6/11 16:31:10
// @run-at document-idle
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// ==/UserScript==
// debugger;
(function () {
    function checkDetailInfo(href, nameDiv) {
        $.ajax({
            url: href, success: function (result) {
                let res2 = $(result).find(".detail_game_l_r_ctit")[0];
                let h1 = res2.children[0];
                let isGreen = h1.innerText.indexOf("免安装")
                if (isGreen != -1) {
                    nameDiv.innerHTML = "<font color='#00FF00'>免安装</font>@" + nameDiv.innerText;
                }
            }
        });
    }

    function startNodeCheck(node) {
        let link = node.children[0];
        let nameDiv = node.children[1]
        checkDetailInfo(link.href, nameDiv);
    };

    let allItems = $(".famous-li")
    allItems.each(function (i) {
        startNodeCheck(this);
    });

    let famousBox = $(".famous-ul").on("DOMNodeInserted", function (event) {
        var target = event.target;
        if (target.className == "famous-li") {
            startNodeCheck(target);
        }
    });

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址