Skip to content

Instantly share code, notes, and snippets.

@milotek
Last active August 12, 2026 08:35
Show Gist options
  • Select an option

  • Save milotek/7da6b6cdb36be16c466cb3c1dde61c91 to your computer and use it in GitHub Desktop.

Select an option

Save milotek/7da6b6cdb36be16c466cb3c1dde61c91 to your computer and use it in GitHub Desktop.
Stop Reddit from asking you to sign up
// ==UserScript==
// @name Reddit Login Modal & Sidebar Remover
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Hides Reddit login/signup upsell modal and left sidebar, and restores page scrolling.
// @author milotek.dev
// @match https://*.reddit.com/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
const css = `
/* Hide Reddit login/signup modal */
div#desktop-dynamic-upsell-dialog,
[id="desktop-dynamic-upsell-dialog"],
/* Hide left sidebar */
#left-sidebar-container {
display: none !important;
}
/* Restore scrolling on html and body */
html, body {
overflow: auto !important;
}
`;
if (typeof GM_addStyle !== 'undefined') {
GM_addStyle(css);
} else {
const style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
(document.head || document.documentElement).appendChild(style);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment