richkmls / old-reddit-redirect Goto Github PK
View Code? Open in Web Editor NEWTampermonkey script to automatically redirect you to old.reddit.com
License: GNU General Public License v3.0
Tampermonkey script to automatically redirect you to old.reddit.com
License: GNU General Public License v3.0
Hi, first of all, thanks you for your fine work, did me a favor a couple of month now, work perfectly without error.
Until today, when reddit keep returning to new layout causing reload, it cant load page unless disable the script, after disabled, the site load the newest layout, then i enabled again and refresh how many is ok, but not as first time.
Step to reproduce:
Use violentmonkey on Chrome/Edge
Rewrite reddit.com to new.reddit.com
open a new reddit tab
Problem
Disable, reload, page load OK
reload the same tab, OK
Open new tab, Problem
Here is your script modified to the newer layout:
Thanks for your time!
Sincerely.
Replacing the current UserScript
metadata block with this will make it possible for userscript managers to automatically check for and install updates (only other change is @version
being iterated):
// ==UserScript==
// @name Old Reddit Redirect
// @version 0.1.2
// @description Redirects you to old.reddit.com
// @author github.com/richkmls
// @match *://*.reddit.com/*
// @exclude /^https?://[a-z]{2}\.reddit\.com/*
// @exclude *out.reddit.com/*
// @exclude *://*.reddit.com/gallery/*
// @exclude *://*.reddit.com/media*
// @run-at document-start
// @updateURL https://github.com/RichKMLS/Old-Reddit-Redirect/raw/main/oldRedditRedirect.user.js
// @downloadURL https://github.com/RichKMLS/Old-Reddit-Redirect/raw/main/oldRedditRedirect.user.js
// @grant none
// ==/UserScript==
On the topic of quality-of-life stuff:
A lot of userscript managers quietly peek at JavaScript documents opened for viewing within the browser to see if they start with a userscript metadata block, evaluating them further and prompting the user for an action to take (including installation) if so.1
To take advantage of this, the installation instructions could be revised to specify a preferred method (instructing readers to simply click a link leading to the raw version of the script) followed by an alternative/fallback method (the current one involving copying and pasting the code).
Reddit has a "no participation" old-style subdomain that needs to be excluded:
// @exclude https://np.reddit.com/*
But apparently, there are more such domains (incomplete list).
So actually it might be best to exclude any 2-character-subdomain.reddit.com
Hello,
I have this script installed in Adguard on Android. Sometimes I use the reddit app, sometimes I view reddit in Chrome, which is when this script becomes handy.
I have a problem when using the app: when I click a link to an external site it doesn't load it, it just stays on a loop trying to load the page. It's stuck looping on "out reddit.com". When I disable the script there's no problem.
I know my use-case is probably odd because I'm hopping between the app and Chrome. But if you can offer any assistance I'd appreciate it.
Thanks!
I think there are a few more URL patterns to account for. These were tested on Safari 16.6 (18615.3.12.11.2) on MacOS 13.5 (22G74) with Userscripts for Safari Version 4.4.3 (74) in an incognito window. Here are some examples, but I tried a few additional links with the same results.
https://i.redd.it/zv02loj5yejb1.png
redirects (very strangely!) to
I wonder if that /r/funny post is something to do with my browser or if it's a reddit quirk? (That's why I was using incognito, to hopefully rule out anything on my end.) It seemed like all i.redd.it links redirected to that same post.
Also,
https://www.reddit.com/gallery/15wdvhr
redirects to
https://old.reddit.com/gallery/15wdvhr
but with a page not found error. I don't think there's an old.reddit.com equivalent for these gallery pages.
Thanks for your work on this userscript!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.