Jump to content

User:Tim@/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tim@ (talk | contribs) at 15:30, 8 March 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function clean(){
	if (location.href.indexOf("#nojs") > 0) {
		return;
	}
	document.querySelectorAll('[style]').forEach(function (e){
		if (e.className.indexOf('ace_') > -1) {
			return;
		}
		if (e.className === 'table-no') {
			e.style.backbroundColor='#400000';
			return;
		}
		if (e.className === 'table-yes') {
			e.style.backbroundColor='#004000';
			return;
		}
		e.removeAttribute('style');
	});
}
clean();