您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
a simple script to block the display of DBD-Raws
当前为
// ==UserScript== // @name 屏蔽 DBD-Raws // @namespace anti-DBD-Raws // @version 0.93 // @description a simple script to block the display of DBD-Raws // @author CropCircle // @match http://*/* // @match https://*/* // @grant none // @run-at document-idle // @exclude https://*.google.* // @exclude https://*.bing.* // @exclude https://*.baidu.* // @exclude https://greasyfork.org/* // @license MIT // ==/UserScript== (function() { 'use strict'; // Define the keywords to filter and replace const keywords = [ '黑暗路基艾尔', 'DBD-Raws', 'DBD分流Q群', 'DBD', 'https://afdian.net/@112127luji', '746546998', '560823326', '1158412873', 'https://space.bilibili.com/97177229', 'https://space.bilibili.com/476857955', '神圣之路基艾尔' ]; const replacement = '██视力保护██'; //const replacenum = '██视力保护██'; // Loop through all the text nodes on the page function traverse(node) { let child, next; switch (node.nodeType) { case 1: // Element case 9: // Document case 11: // Document fragment child = node.firstChild; while (child) { next = child.nextSibling; traverse(child); child = next; } break; case 3: // Text node if (keywords.some((keyword) => node.nodeValue.match(keyword))) { node.nodeValue = node.nodeValue.replace(new RegExp(keywords.join('|'), 'g'), replacement); } break; } } traverse(document.body); })();