Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixes large-screen style issues on github.com
// ==UserScript==
// @name GitHub Style Fixes
// @version 1.2.0
// @namespace http://tampermonkey.net/
// @description The new github design has issues, this can be used to fix them.
// @match https://*.github.com/*
// @grant none
// @run-at document-end
// @downloadURL https://gist.githubusercontent.com/Simonwep/a3926348cb45cc510382ca5cb10f364e/raw
// @updateURL https://gist.githubusercontent.com/Simonwep/a3926348cb45cc510382ca5cb10f364e/raw
// ==/UserScript==
!function () {
const css = str => {
const style = document.createElement('style');
style.innerHTML = str;
requestAnimationFrame(() => document.body.appendChild(style));
};
css(`
/* Fix repository header width */
main > .pagehead {
max-width: 1280px;
margin: 0 auto;
}
/* Force visibility of navigation buttons */
main > .pagehead > nav > ul a {
visibility: visible !important;
}
/* Hide menu button (redundant) */
main > .pagehead > nav .details-overlay {
display: none;
}
/* The issue label is not properly padded */
.IssueLabel {
line-height: 15px;
padding-bottom: 3px;
}
/* Rectangular profile picture and status below */
.avatar-user {
border-radius: 5% !important;
}
.user-status-circle-badge-container {
position: static;
margin-left: 0;
margin-top: 0.5em;
}
.user-status-circle-badge-container,
.user-status-circle-badge,
.user-status-message-wrapper {
opacity: 1 !important;
width: 100% !important;
}
.user-status-emoji-container.user-status-emoji-container.user-status-emoji-container {
width: 2em !important;
margin-right: 0 !important;
}
`);
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.