您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fixes broken links on Turbobricks
// ==UserScript== // @name TurboFicks // @namespace http://turbobricks.com/ // @version 262 // @description Fixes broken links on Turbobricks // @author pinguin // @license gnu gpl // @include *turbobricks.com* // @require http://code.jquery.com/jquery-latest.js // ==/UserScript== let lookup_table = { 'https://turbobricks.com/data/avatars/m/12/12241.jpg?1727919708': 'https://i.imgur.com/Ld9eVyS.gif', }; for (let image of document.getElementsByTagName('img')) { for (let query in lookup_table) { if (image.src == query) { image.src = lookup_table[query]; } } } const thread = /\?t\=/ ; const post = /\?p\=/ ; const regex = /.*show(?:post|thread)\.php\?(?:p|t)\=([0-9]+).*/i; if (thread.exec(window.location.href)) { // make thread url; window.location.href = window.location.href.replace(regex, "https://turbobricks.com/index.php?threads/$1"); } else if (post.exec(window.location.href)) { // make post url window.location.href = window.location.href.replace(regex, "https://turbobricks.com/index.php?posts/$1"); }