Skip to content

Instantly share code, notes, and snippets.

@healthybinary
Last active February 7, 2024 22:16
Show Gist options
  • Save healthybinary/d00f3f56fe214e86a8a038e85f0c5741 to your computer and use it in GitHub Desktop.
Save healthybinary/d00f3f56fe214e86a8a038e85f0c5741 to your computer and use it in GitHub Desktop.
Greasemonkey/Violentmonkey Userscript Redirects to old.reddit.com
// ==UserScript==
// @name Reddit redirect to old.reddit.com
// @match *://*.reddit.com/*
// @grant none
// @run-at document-start
// @description Redirects to old.reddit.com
// @version 1.0.1
// @downloadURL https://gist.github.com/healthybinary/d00f3f56fe214e86a8a038e85f0c5741/raw/73baff5ac42066f3345195e28b03acaee62582f3/Reddit.user.js
// @updateURL https://gist.github.com/healthybinary/d00f3f56fe214e86a8a038e85f0c5741/raw/73baff5ac42066f3345195e28b03acaee62582f3/Reddit.user.js
// @license MIT
// @supportURL https://gist.github.com/healthybinary/d00f3f56fe214e86a8a038e85f0c5741
// @homepageURL https://gist.github.com/healthybinary/d00f3f56fe214e86a8a038e85f0c5741
// @icon https://cdn.icon-icons.com/icons2/2873/PNG/512/reddit_pixel_logo_icon_181927.png
// ==/UserScript==
(function () {
const currentURL = new URL(window.location.href);
if(currentURL.hostname !== 'old.reddit.com') {
window.location.replace('https://old.reddit.com' + location.pathname);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment