您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace every instance of "Trump" in webpage text with a random humorous insult
当前为
// ==UserScript== // @name Trump Renamer // @namespace http://tampermonkey.net/ // @version 1.2 // @description Replace every instance of "Trump" in webpage text with a random humorous insult // @author You // @match *://*/* // @grant none\ // @license MIT // ==/UserScript== (function() { 'use strict'; const replacements = [ "Onion-Eyed Flap Dragon", "Leather-Faced Piss Jar", "Mangled Apricot Hellbeast", "Bawbag-Eyed Fuck Bumper", "Toupéd Fucktrumpet", "Knuckle-Brained Fart Lozenge", "Degenerate Corned Beef Face Syrup Wearing Wankstain", "Rug Wearing Thunder Nugget", "Cock Juggling Thundercunt", "Gerbil-Headed, Woodstained, Haunted Spunktrumpet", "Spatchcocked Turdwaffle" ]; // Functional helper to get a random element from an array const randomFromArray = arr => arr[Math.floor(Math.random() * arr.length)]; // Replace "trrump" in a string with a random replacement const replaceTrumps = text => text.replace(/trump/gi, () => randomFromArray(replacements)); // Walk the DOM and replace text nodes const walk = node => { if (node.nodeType === 3) { // Text node node.nodeValue = replaceTrumps(node.nodeValue); } else if (node.nodeType === 1 && node.nodeName !== "SCRIPT" && node.nodeName !== "STYLE" && node.nodeName !== "TEXTAREA" && node.nodeName !== "INPUT") { Array.from(node.childNodes).forEach(walk); } }; // Initial run walk(document.body); // Optionally, handle dynamically added content const observer = new MutationObserver(mutations => { mutations.forEach(mutation => { Array.from(mutation.addedNodes) .filter(n => n.nodeType === 1) .forEach(walk); }); }); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址