Jump to content

User:Tim@/common.js

From Wikipedia, the free encyclopedia
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.backgroundColor='#400000';
			return;
		}
		if (e.className === 'table-yes') {
			e.style.backgroundColor='#004000';
			return;
		}
		e.removeAttribute('style');
	});
}
clean();