Greasy Fork is available in English.
2022/6/11 16:31:10
当前为
// ==UserScript== // @license MIT // @name 游侠下载免安装提示 // @namespace Violentmonkey Scripts // @match https://down.ali213.net/pcgame/ // @match https://down.ali213.net/pcgame/all/* // @grant none // @version 1.0 // @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; startNodeCheck(target); }); })();