Skip to content

Instantly share code, notes, and snippets.

@Strajk
Created November 14, 2025 17:42
Show Gist options
  • Select an option

  • Save Strajk/88f114855d8f72ec7a3e9510a75d434e to your computer and use it in GitHub Desktop.

Select an option

Save Strajk/88f114855d8f72ec7a3e9510a75d434e to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Reddit Refined
// @version 1.1.0
// @description Various refinements for Reddit browsing experience
// @match https://www.reddit.com/*
// @match https://*.reddit.com/*
// @run-at document-start
// @grant none
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @license MIT
// @author strajk
// ==/UserScript==
"use strict";
(function() {
const url = new URL(window.location.href);
let shouldRedirect = false;
// Feature 1: Redirect www.reddit.com to old.reddit.com
if (url.hostname === 'www.reddit.com') {
url.hostname = 'old.reddit.com';
shouldRedirect = true;
}
// Feature 2: Remove translation parameter from URL
if (url.searchParams.has('tl')) {
url.searchParams.delete('tl');
shouldRedirect = true;
}
// Redirect if any changes were made
if (shouldRedirect) {
window.location.replace(url.toString());
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment