您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fixes quote links to same page
// ==UserScript== // @name Facepunch Quote Link Fix // @namespace AkariAkaori // @include http://facepunch.com/showthread.php?* // @version 1 // @grant none // @description Fixes quote links to same page // ==/UserScript== (function() { var quotes = document.getElementsByClassName("quote"); var info, link; for(var i=0;i<quotes.length;i++) { info = quotes[i].getElementsByClassName("information")[0]; if (!info) continue; link = info.getElementsByTagName("a")[0]; if (!link) continue; var post = link.getAttribute("href").split('#')[1].replace("post", "post_"); if (document.getElementById(post) != null) { link.setAttribute("href", document.URL.split('#')[0] + "#" + post); } } }) ();