Posted: . At: 9:01 AM. This was 9 months ago. Post ID: 18337
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



A very useful user script to redirect to classic Reddit.


The new Reddit design is not the best in my opinion. I prefer the old look of the old.reddit.com layout. So this userscript will be very suitable.

userscript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name         Reddit Redirect to Old Reddit
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Redirects www.reddit.com to old.reddit.com
// @author       You
// @match        https://www.reddit.com/*
// @grant        none
// ==/UserScript==
 
(function() {
    'use strict';
 
    // Check if the current URL starts with 'www.reddit.com'
    if (window.location.hostname === 'www.reddit.com') {
        // Extract the path and query parameters from the URL
        const pathAndQuery = window.location.pathname + window.location.search;
 
        // Create the new URL with 'old.reddit.com'
        const newURL = 'https://old.reddit.com' + pathAndQuery;
 
        // Redirect the page to the new URL
        window.location.href = newURL;
    }
})();

This is a good way to handle redirecting to the older Reddit look. Install Tampermonkey or Greasemonkey extension in your browser. Create a new userscript and paste the code shown above.

Save the script, and it should automatically start redirecting www.reddit.com to old.reddit.com whenever you visit any page on Reddit.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.