Created
May 2, 2019 23:55
-
-
Save machavity/420197ff9108e0b757c9bbb7d487f965 to your computer and use it in GitHub Desktop.
Hide Stack Overflow Sidebar Userscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide Stack Overflow Sidebar | |
// @namespace SOCVR | |
// @version 0.1 | |
// @description Hides the sidebar | |
// @author Machavity | |
// @include /^https?:\/\/(.*\.)?stackoverflow\.com/.*$/ | |
// @exclude *://chat.stackexchange.com/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.getElementById('sidebar').style.display = 'none'; | |
document.getElementById('mainbar').style = 'width: auto'; | |
})(); |
It works, but the sidebar is still visible for a split second when the page loads. And you need to have user script manager installed.
A better option for me was to add an additional filter in uBlock Origin. I use this addon anyway, and it solves the above inconveniences.
! 2023-06-24 https://stackoverflow.com
stackoverflow.com###sidebar
stackoverflow.com###mainbar:style(width: auto !important)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple and it works. Thank you!