Greasemonkey for SimpleBits

January 24th, 2008

Dan Cederholm is in the middle of another live design refresh. In the meantime SimpleBits has no styling what-so-ever. I'm not a very patient person and I love Dan Cederholm's designs so I decided not to wait for the new design.

Dan removes the <link> element for his screen.css so I've created a Greasemonkey script that add's it back in as well as removes the little 'tune up' message.

var link = document.createElement('link');
  link.setAttribute('rel', 'stylesheet');
  link.setAttribute('type', 'text/css');
  link.setAttribute('href', '/css/screen.css');
  link.setAttribute('media', 'screen, projection');

var style = document.createElement('style');
  style.setAttribute('id', 'hide-h2');
  style.setAttribute('type', 'text/css');
  style.setAttribute('media', 'screen, projection');

var text = document.createTextNode('body > h2 { display: none; }');

document.getElementsByTagName('head')[0].appendChild(link);
document.getElementsByTagName('head')[0].appendChild(style);
document.getElementById('hide-h2').appendChild(text);

Posted by Keri Henare Filed in design

Leave a Reply