GithubHelp home page GithubHelp logo

richkmls / old-reddit-redirect Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 9.0 28 KB

Tampermonkey script to automatically redirect you to old.reddit.com

License: GNU General Public License v3.0

JavaScript 100.00%
javascript old-reddit reddit tampermonkey tampermonkey-userscript url-redirect new-reddit old-reddit-redirect

old-reddit-redirect's Introduction


🏆 Highlighted Personal Projects

  • leukoRight: A web app that uses a custom-built Keras model to recognize and classify white blood cells from microscopic images. It can distinguish between different types of WBCs and identify artifacts and bursted cells. I created this app as a way to explore the possibilities of image recognition technologies and to learn how to develop Keras models from scratch.
      •   

  • cashTrack: A powerful tool that allows you to split bills without actually splitting them. It uses the secure and encrypted Signal messenger and an SQL database to create a virtual ledger that tracks your money transactions with your contact. I developed cashTrack as a personal project to simplify my expense management with my partner and to enhance my skills in databases and scripting.
      •   

  • vid2train: A tool that helps users make image datasets from videos for AI training. It makes it easy and fast to get frames from videos without errors. It works with any video file format and gives a folder of images with different names and times. It also lets users change the image size, remove bad images, and control how many images to get. I made this tool to help other AI enthusiasts and researchers who want to use video image data in their projects.
      •   

  • theScreensaver: A zsh script that creates a randomized montage of video clips from your media library. It is part of a larger suite I developed for my Home Media server running on Artix Linux. When the user interface is idle for too long, the script activates and selects 100 random 9-second intervals from various video files (mkv, mp4, webm, etc) in a directory. It then appends them to an EDL file and plays it with mpv. theScreensaver prevents screen burn-in by displaying dynamic familiar visuals instead of a static interface.
      •   

  • HashCheck: This is a program that leverages AutoHotkey (AHK), PowerShell and VBScript to securely open a single-instance Excel file with a verified SHA256 hash. The program bypasses the user macro settings and executes a Workbook_Open VBA script embedded in the Excel file. This program demonstrates my proficiency in integrating different scripting languages and tools to accomplish sophisticated tasks with minimal code.
      •   

  • ZipRecruiter 1-Click Filter: A JavaScript program that improves your job search experience on ZipRecruiter. It enables you to filter out jobs that require you to apply on external websites or have low qualification grades. This way, you can concentrate on the most suitable and convenient opportunities for your career goals. This program demonstrates my ability to create user-friendly and efficient web tools using JavaScript as well as my ability to quickly produce purposeful code.
      •   

  • I also made a tiny contribution to Pytorch which was merged on Oct 3 2022: pytorch/pytorch#85679 😁😁😁

💡 Let's collaborate!

I'm always open to collaborating on projects and innovative ideas.
If you have something in mind, feel free to contact me at [email protected] or open an issue on one of my repositories.

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

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!

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.

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

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

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.