您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
9/4/2020, 1:36:13 PM
// ==UserScript== // @name Manjaro Forum auto-redirect to old site for missing pages // @namespace Manjaro Linux Forum // @match https://forum.manjaro.org/t/* // @grant none // @version 1.1 // @author SinTan // @description 9/4/2020, 1:36:13 PM // ==/UserScript== not_found=document.getElementsByClassName("page-not-found") if(not_found) { error_msg=not_found[0].getElementsByClassName("title")[0].innerHTML if (error_msg=="Oops! That page doesn’t exist or is private.") { redir_notif=document.createElement("h3") redir_notif.innerHTML="(Redirecting to old forum...)" not_found[0].appendChild(redir_notif) window.location.href=window.location.href.replace("://forum.","://archived.forum.") } }