Skip to content

Instantly share code, notes, and snippets.

@disco0
Forked from simshaun/Reddit.user.js
Last active October 21, 2020 12:12
Show Gist options
  • Save disco0/edfc5796da57c8cdca4858d5a76db8b2 to your computer and use it in GitHub Desktop.
Save disco0/edfc5796da57c8cdca4858d5a76db8b2 to your computer and use it in GitHub Desktop.
Userscript - Redirect all reddit pages through old.reddit.com
// ==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