您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
remove hostnames from slashdot domains
// ==UserScript== // @name slashdot de-hostify links // @namespace slashdot // @description remove hostnames from slashdot domains // @include https://slashdot.org/* // @version 0.1a // @grant none // ==/UserScript== var pattern = /^https:\/\/.*\.slashdot\.org\// var pattern2 = /^\/\/.*\.slashdot\.org\// anchor = document.getElementsByTagName('a'); for (i = 0; i < anchor.length; i++) { if (pattern.test(anchor[i].href)) { anchor[i].href = anchor[i].href.replace(pattern, 'https://slashdot.org/'); } if (pattern2.test(anchor[i].href)) { anchor[i].href = anchor[i].href.replace(pattern2, '//slashdot.org/'); } }