defBackgroundUp

By lucianolllg Last update Sep 21, 2009 — Installed 815 times. Daily Installs: 5, 0, 1, 0, 2, 1, 0, 0, 2, 0, 0, 2, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 3, 4, 4, 0, 0, 2, 1, 2

There are 16 previous versions of this script.

/*<![CDATA[*/
// ==UserScript==
// @name          defBackgroundUp
// @description   Replace #FFFFFF backgrounds #F7FCF5 - #F5FCF3 - #F9FFF6 ; rgb(249, 255, 246) backgrounds 
// @include       *
// @namespace     userscripts.org/users/46776
// ==/UserScript==
 function confBackg() {
	var doc=document,backs="rgb(255, 255, 255)",getref=['html','div','td','table','body'],
compbc=function(doc,astag) {return doc.defaultView.getComputedStyle(astag,null).backgroundColor;},
tgst=function(st) {st.style.backgroundColor='#f9fff6';};
   for(var i=getref.length,tag; i--;) {
	tag=doc.getElementsByTagName(getref[i]);
   for(var j=0,ast=tag.length,astag; j<ast; j++) {
	astag=tag[j]; if(compbc(doc,astag)==backs) { tgst(astag);}
   }
   }
 }

   document.addEventListener('load',confBackg(),false);

/*]]>*/