/*
** Allow pretty printing of blogspot.com pages.  Works by inserting a print
** CSS stylesheet.  
**
** CSS insertion taken from Extra Hot: 
** http://xtrahot.chili-mango.net/2005/09/peoplesoft-page-stylesheet-injectionhtml/
** (though removed IE check, since seems to work in IE7)
**
** Designed for greasemonkey, but can also be used as a bookmarklet, see
** blogger_print.url for bookmarklet URL.
** Uses the script loader from Western Civ (e.g. http://www.westciv.com/mri/)
** See blog_print.url for Javascript URL.
*/
// ==UserScript==
// @name          Blogger Print
// @namespace     http://ndanger.org/
// @description   Provide blogger with a print CSS sheet
// @include       http://*.blogspot.com/*
// ==/UserScript==

function addPrintCss(cssUrl) {
  var s = document.createElement('link');
  s.setAttribute('rel','stylesheet');
  s.setAttribute('type','text/css');
  s.setAttribute('href', cssUrl);
  s.setAttribute('media', 'print');
  document.getElementsByTagName('head')[0].appendChild(s);
}

addPrintCss('http://ndanger.org/projects/blogger_print/blogger_print.css');

