您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces text (mostly) according to http://xkcd.com/1288/
// ==UserScript== // @name XKCD Text Replacer // @version 1.0 // @description Replaces text (mostly) according to http://xkcd.com/1288/ // @match http://*/* // @require http://code.jquery.com/jquery-latest.js // @namespace https://gf.qytechs.cn/users/1858 // ==/UserScript== GM_addStyle(".xkcd_replaced:hover { text-decoration:underline; }"); var array = { "witnesses": "dudes I know", "allegedly": "kinda probably", "new study": "Tumblr post", "rebuild": "avenge", "space": "spaaace", "Google Glass": "Virtual Boy", "smartphone": "Pokédex", "electric": "atomic", "senator": "elf-lord", "car": "cat", "election": "eating contest", "congressional leaders": "river spirits", "Homeland Security": "Homestar Runner", "could not be reached for comment": "is guilty and everyone knows it" }; $(function(){ $("body") .find("*") .contents() .filter(function() { return this.nodeType === 3; //Node.TEXT_NODE }) .each(function(){ var text = $(this).text(); for (var val in array){ text = text.replace(new RegExp("\\b" + val + "\\b", "gi"), "<span class='xkcd_replaced' title='" + val + "'>" + array[val] + "</span>"); } $(this).replaceWith(text); }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址