Skip to content

Instantly share code, notes, and snippets.

@mkows
Last active September 28, 2017 11:29
Show Gist options
  • Save mkows/0f5e66688878e167cb4737a4ac1b067b to your computer and use it in GitHub Desktop.
Save mkows/0f5e66688878e167cb4737a4ac1b067b to your computer and use it in GitHub Desktop.
Make StackOverflow layout less distracting - removes sidebar and notifications
// ==UserScript==
// @name StackOverflow - Zen
// @namespace mkows
// @description Make StackOverflow layout less distracting - removes sidebar and notifications
// @include http://stackoverflow.com/*
// @include https://stackoverflow.com/*
// @version 0.0.2
// ==/UserScript==
// Install steps:
// 1. Open in Chrome: chrome://extensions
// 2. Drag and drop this userscript file (make sure it has extension: *.user.js)
//
// Based on: http://hayageek.com/greasemonkey-tutorial/#hello-world
var sidebarElement = document.getElementById("sidebar");
if (sidebarElement) {
sidebar.style.display="none";
}
var secNav = document.getElementsByClassName("secondary-nav")[0];
if (secNav) {
secNav.style.display="none";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment