Skip to content

Instantly share code, notes, and snippets.

@zudsniper
Forked from msanders/old-reddit-redirect.user.js
Created February 12, 2024 07:12
Show Gist options
  • Save zudsniper/74544d62e0532ea3ca259519d7e49b02 to your computer and use it in GitHub Desktop.
Save zudsniper/74544d62e0532ea3ca259519d7e49b02 to your computer and use it in GitHub Desktop.
Userscript: Old Reddit Redirect
// ==UserScript==
// @name Old Reddit Redirect
// @description Redirects www.reddit.com to the old version of the website
// @downloadURL https://gist.githubusercontent.com/msanders/52700d5c5ed76f1114594ddb862b530e/raw/old-reddit-redirect.user.js
// @updateURL https://gist.githubusercontent.com/msanders/52700d5c5ed76f1114594ddb862b530e/raw/old-reddit-redirect.user.js
// @version 2023.10.19
// @run-at request
// ==/UserScript==
[
{
"id": 1,
"action": { "type": "allow" },
"condition": { "regexFilter": "^https?://www\\.reddit\\.com/media\\?", "resourceTypes": ["main_frame"] }
},
{
"id": 2,
"action": { "type": "allow" },
"condition": { "regexFilter": "^https?://www\\.reddit\\.com/gallery/", "resourceTypes": ["main_frame"] }
},
{
"id": 3,
"action": { "type": "allow" },
"condition": { "regexFilter": "^https?://www\\.reddit\\.com/settings/", "resourceTypes": ["main_frame"] }
},
{
"id": 4,
"action": { "type": "allow" },
"condition": { "regexFilter": "^https?://www\\.reddit\\.com/r/\\w+/s/", "resourceTypes": ["main_frame"] }
},
{
"id": 5,
"action": {
"type": "redirect",
"redirect": {
"transform": { "scheme": "https", "host": "old.reddit.com" }
}
},
"condition": { "regexFilter": "^https?://www\\.reddit\\.com/", "resourceTypes": ["main_frame"] }
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment