defBackgroundUp

Replace #FFFFFF backgrounds in #ECF2EA rgb(236, 242, 234),is more natural ergonomic color for your eyes, natural contrast.

目前为 2015-10-23 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name defBackgroundUp
  3. // @description Replace #FFFFFF backgrounds in #ECF2EA rgb(236, 242, 234),is more natural ergonomic color for your eyes, natural contrast.
  4. // @include *
  5. // @grant none
  6. // @namespace https://greasyfork.org/en/users/3561-lucianolll
  7. // @namespace https://openuserjs.org/users/lucianolll
  8. // @namespace https://userscripts.org/users/46776
  9. // @version 10
  10. // ==/UserScript==
  11. var confBackg=function(){
  12. var doc=document,getref=['body','table','td','div','html','dl','ul','pre'],
  13. abg=function(tg){return function(d){return getComputedStyle(tg[d],null).backgroundColor=='rgb(255, 255, 255)';}},
  14. ts=function(tg){return function(d){return tg[d].style;}};
  15. for(var a=8,n=0,tag,at,tf,tmp=[];a--;){
  16. tag=doc.getElementsByTagName(getref[a]);at=abg(tag);tf=ts(tag);
  17. for(var i=tag.length;i--;){if(at(i)){tmp[n++]=tf(i);}}
  18. } tmp.forEach(function(s){s.backgroundColor='#ecf2ea';});tmp=null;
  19. };
  20. addEventListener('load',confBackg,false);