Fixing Github with Greasemonkey

On March 14, 2009 · 1 Comments

Github is great, I really can’t say enough good things about them.  What’s not so great is their css, as it breaks badly if you change you dpi.  I finally found the root cause of this which is the search field gets squeezed vertically, and collides with the div under it, forcing that to the right, and forcing the right sidebar down.  I sent in some feedback, but am not sure if/when it might get applied.

So, in the short term I added the following greasemonkey script for github.com

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName(‘head’)[0];
    if (!head) { return; }
    style = document.createElement(‘style’);
    style.type = ‘text/css’;
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle(‘#header .topsearch {width: 25em}’);

And voila, the site is readable again.

 
September 2010
S M T W T F S
« Aug    
 1234
567891011
12131415161718
19202122232425
2627282930