// ==UserScript== // @name 新版萌娘百科去广告 // @namespace Violentmonkey Scripts // @match *://*.moegirl.org.cn/* // @grant none // @version 1.2 // @author lmttlw // @description 2023/6/15 10:53:08 // @license none // @downloadURL none // ==/UserScript== var IsKillAdvertise = true;//是否去广告 var IsKillBulletin = true;//是否去公告 //挂在那×都×不掉的赖皮蛇广告我是真没办法了 (function () { document.querySelector("body").addEventListener('DOMNodeInserted', function () { if (IsKillAdvertise) { var gg1 = document.querySelector("._7otqKPYBDS_iu9a9k"); if (gg1) { gg1.click(); } var gg1_1 = document.querySelector("._7otqKPYBDS_aj68fz"); if (gg1_1) { gg1_1.click(); } var gg2 = document.querySelector(".rmYm6-AH87_iu9a9k"); if (gg2) { gg2.click(); } var gg2_1 = document.querySelector(".rmYm6-AH87_aj68fz"); if (gg2_1) { gg2_1.click(); } var gg3 = document.querySelector(".pWT4twW70y_q5hlse"); if (gg3) { gg3.click(); } const links = document.querySelectorAll("a.nrf4GHtL1g_iu9a9k"); // 对每个链接执行操作 links.forEach(function (link) { link.click() }); const links_1 = document.querySelectorAll("a.nrf4GHtL1g_aj68fz"); // 对每个链接执行操作 links_1.forEach(function (link) { link.click() }); } if (IsKillBulletin) { var gg3 = document.querySelector(".n-base-close"); if (gg3) { gg3.click(); } } }) })();