Thursday, February 28, 2008

Slashdot Userscript

The funny quote in the footer of slashdot has always held my attention...here's a userscript to make it the title of the window
// ==UserScript==
// @name          Slashdot title quote
// @include       http://www.slashdot.org
// @include       http://www.slashdot.org/*
// @include       http://*.slashdot.org
// @include       http://slashdot.org/*
// @author        fc
// @namespace     http://fc-unleashed.blogspot.com
// @description   the footer quote in the title
// ==/UserScript==
(function() {
   if ( document.getElementById ) {
       var footer = document.getElementById('footer');
       if ( footer && footer.getElementsByTagName ) {
           var small = footer.getElementsByTagName('small');
           if ( small && small[0] ) {
               document.title = small[0].firstChild.nodeValue;
           }
       }
   }
})();

No comments: