Skip to content

Instantly share code, notes, and snippets.

@cb1kenobi
Last active November 6, 2019 05:07
Show Gist options
  • Save cb1kenobi/5086741 to your computer and use it in GitHub Desktop.
Save cb1kenobi/5086741 to your computer and use it in GitHub Desktop.
Greasemonkey script to make GitHub widescreen friendly. There's probably some quirks. Use at your own risk.
// ==UserScript==
// @name GitHub Widescreen
// @namespace https://github.com
// @include https://github.com/*
// @grant none
// ==/UserScript==
(function() {
var style = document.createElement("style");
style.type = "text/css";
style.innerHTML = "\
.container { \
position: relative; \
width: 100% !important; \
} \
.container > .repository-content { \
margin: 0 auto; \
width: 98% !important; \
} \
.header > .container, \
.pagehead, \
.org-header > .container, \
.org-main, \
.page-content, \
.container > .site-footer { \
padding-left: 2%; \
padding-right: 2%; \
} \
.org-main { \
margin-right: 300px; \
} \
.org-sidebar { \
position: absolute; \
top: 0; \
right: 2%; \
} \
.blob-code { \
-moz-tab-size: 4 !important; \
tab-size: 4 !important; \
} \
table.files td.content { \
width: 25%; \
} \
";
document.getElementsByTagName("head")[0].appendChild(style);
}());
@TWiStErRob
Copy link

Great, just what I needed! Thank you!
Tip: Look up Stylish for your browser. It's easier to do style-only mods with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment