Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Redirect Reddit URLs
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Redirects all URLs from www.reddit.com to new.reddit.com, preserving everything after the domain name.
- // @author FurballGamer
- // @match *://www.reddit.com/*
- // @exclude *://reddit.com/*
- // @exclude *://www.reddit.com/media*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // Get the current URL
- var currentUrl = window.location.href;
- // Replace 'www.reddit.com' with 'new.reddit.com'
- var newUrl = currentUrl.replace('www.reddit.com', 'new.reddit.com');
- // Redirect to the new URL
- window.location.href = newUrl;
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement