Add a custom stylesheet to a page

The code

var a = prompt('Give the stylesheet URI');
if (a) {
  var b = document.createElement('link');
  b.setAttribute('type', 'text/css');
  b.setAttribute('media', 'screen');
  b.setAttribute('rel', 'stylesheet');
  b.setAttribute('href', a);
  document.getElementsByTagName('head')[0].appendChild(b);
}
void(0);

Example

Use http://krijnhoetmer.nl/stuff/favelets/add-stylesheet/style.css which contains body { color: red; }:

Test it