User:Curiouscrab/global.js

// clock stuff military=false; UTC=false; timezone='EDT'; importScriptPage('Mediawiki:Common.js/displayClockLocal.js', 'admintools'); // make pages open in new tab for(i=0;i<document.getElementById('mw-content-text').getElementsByTagName('a').length;i++) { document.getElementById('mw-content-text').getElementsByTagName('a')[i].target='_blank'; } // reload page automatically after time var disable = [-1,1201,2001]; var pause = false; if(wgAction=='view' && disable.indexOf(wgNamespaceNumber)<0) { setInterval(function { if(pause==false) { window.location.reload(true); } }, 60000); } // fix timestamps for local time importScriptPage('Mediawiki:Common.js/localTimeComments.js', 'admintools'); // auto-show notifications when have notifications if(skin=='monobook') { setInterval(function { if(document.getElementsByClassName('count')[0].innerHTML!=='(0)' && document.getElementsByClassName('count')[0].innerHTML!=='(?)') { document.getElementById('wall-notifications-dropdown').style.display='table'; } }, 0); }