Git Product home page Git Product logo

old-reddit-redirect's Introduction

Old Reddit Redirect

This is a user script that automatically redirects you to old.reddit.com when you visit any reddit.com page. It works on any browser that supports user scripts, such as Tampermonkey or Greasemonkey.

Why use this script?

Some users may prefer the old reddit design for various reasons, such as simplicity, familiarity, or performance. This script saves you the hassle of manually changing the URL.

How to use this script?

  1. To use this script, you need to install a browser extension that allows you to run custom JavaScript code on any website. Some examples are Tampermonkey, Greasemonkey, or Violentmonkey.
  2. After installing the extension, create a new script and copy the code from this repository into it. Save and activate the script.
  3. Enjoy browsing old reddit!

Feedback and support

If you have any issues, suggestions, or questions about this script, please feel free to open an issue

old-reddit-redirect's People

Contributors

ikeman2003 avatar richkmls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

old-reddit-redirect's Issues

i.redd.it and gallery URLs

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

https://old.reddit.com/r/funny/comments/media/nice_hat/?url=https%3A%2F%2Fi.redd.it%2Fzv02loj5yejb1.png

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!

[enhancement][documentation] @updateURL and @downloadURL declarations for automatic updates; Link to raw script in installation instructions

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).

Footnotes

  1. Example (Violentmonkey, Firefox) โ†ฉ

Needs excludes

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

Reddit keep reloading

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:
image

Thanks for your time!
Sincerely.

Issue when using Reddit Android app

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.