-
-
Save disco0/edfc5796da57c8cdca4858d5a76db8b2 to your computer and use it in GitHub Desktop.
Userscript - Redirect all reddit pages through old.reddit.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Old Reddit, Forever | |
// @namespace gitlab.com/disk0/userscript/reddit/old | |
// @version 0.1.0 | |
// @author disk0 | |
// @include /^https?:\/\/((?!old)[a-z][a-z\d_]*\.)?reddit\.com.*/ | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(() => { | |
console.info( | |
'%c[OldRedditForever]%c Redirecting to old reddit from url: %o', | |
'border-radius: 0.25em; padding: 0.15em 0.3em 0.25em; background: #04C; color: white', | |
'color: #04C; font-weight: 600;', | |
location.href | |
); | |
window.location.href = 'https://old.reddit.com' + location.pathname; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment