reddit.com - Ensure 'old.reddit.com' URL.

Always redirect to 'old.reddit.com'.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name               reddit.com - Ensure 'old.reddit.com' URL.
// @namespace          a-pav
// @description        Always redirect to 'old.reddit.com'.
// @match              *://*.reddit.com/*
// @match              *://reddit.com/*
// @version            0.1
// @run-at             document-start
// @author             a-pav
// @grant              none
// @icon               https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-76x76.png
// ==/UserScript==

if(window.location.hostname === "old.reddit.com" ) { // already on old.reddit.com
	// script matches any reddit.com url, including 'old.reddit.com'.
	// this gives the option for quick enabling/disabling through script manager's icon, anywhere on reddit, wether using new or old design.
	return
}

window.location.replace("https://old.reddit.com" + window.location.pathname + window.location.search + window.location.hash);