Last active
November 24, 2018 20:35
-
-
Save huwcbjones/ed75b853f1a08fbf8ffa353ff1650205 to your computer and use it in GitHub Desktop.
Fix portrait view on new stackoverflow layout
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 Stackoverflow Portrait Fixer | |
// @namespace https://gist.github.com/huwcbjones/ed75b853f1a08fbf8ffa353ff1650205 | |
// @version 0.1 | |
// @description Fix portrait view on new stackoverflow layout | |
// @author huwcbjones | |
// @match *://stackoverflow.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.addEventListener('load', function() { | |
if(window.innerHeight <= window.innerWidth){ | |
return; | |
} | |
let leftSideBar = document.getElementById("left-sidebar"); | |
let mainBar = document.getElementById("mainbar"); | |
let sideBar = document.getElementById("sidebar"); | |
mainBar.style.width = "100%"; | |
sideBar.style.display = "None"; | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment