defBackgroundUp

Replace background colors #FFFFFF rgb(255, 255, 255) in #EDF2EB rgb(237, 242, 235) or #ECF2EA rgb(236, 242, 234), natural and ergonomic background colors to view; Reduce eye strain.

目前為 2017-04-24 提交的版本,檢視 最新版本

// ==UserScript==
// @name          defBackgroundUp
// @description   Replace background colors #FFFFFF rgb(255, 255, 255) in #EDF2EB rgb(237, 242, 235) or #ECF2EA rgb(236, 242, 234), natural and ergonomic background colors to view; Reduce eye strain.
// @include       *
// grant    none
// @namespace     https://greasyfork.org/en/users/3561-lucianolll
// @namespace     https://openuserjs.org/users/lucianolll
// @version     20
// ==/UserScript==
const genfc={
confBackg(){
	const doc=document,gtb=(ds)=>{if(getComputedStyle(ds,null).backgroundColor==='rgb(255, 255, 255)'){return ds.style;} return false;},tmp=[];
   ['body','table','td','div','html','dl','ul','pre'].map(ta=>tmp.push(...Array.from(doc.getElementsByTagName(ta),ds=>gtb(ds))));
   tmp.map(s=>s.backgroundColor='#edf2eb');
},
};
   addEventListener('load',genfc.confBackg(),false);