Skip to content

Instantly share code, notes, and snippets.

@Gkjsdll
Last active December 24, 2023 10:55
Show Gist options
  • Save Gkjsdll/9c93042b0e9b7a5217e1a4c87535aab2 to your computer and use it in GitHub Desktop.
Save Gkjsdll/9c93042b0e9b7a5217e1a4c87535aab2 to your computer and use it in GitHub Desktop.
Automatically reditrect www.reddit.com to old.reddit.com
// ==UserScript==
// @name No New Reddit
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Reditrect www.reddit.com to old.reddit.com
// @author Gkjsdll (zackwinchell@gmail.com)
// @match *://www.reddit.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
location.replace(location.href.replace("www.reddit.com", "old.reddit.com"));
})();
@ashleyharvey
Copy link

Thank you!

@cyxlops
Copy link

cyxlops commented Apr 9, 2019

Can you edit this to check if the link is already old.reddit.com? If I open reddit with the old design, the script will still run and cause the page to refresh again.

@Gkjsdll
Copy link
Author

Gkjsdll commented Apr 18, 2021

Can you edit this to check if the link is already old.reddit.com? If I open reddit with the old design, the script will still run and cause the page to refresh again.

I've not seen this behavior. What extension are you using to manage userscripts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment