User:Curiouscrab/global.js

// auto-fix skin for chat if(wgPageName == 'Special:Chat' && skin == 'monobook') { window.location.search = '?useskin=wikia'; } // fake talk notification $.get('http://sp.wikia.com/api.php?action=query&prop=revisions&titles=User:Curiouscrab/talk&format=json',function(data){ if(data.query.pages[Object.keys(data.query.pages)[0]].revisions[0].user !== 'Curiouscrab') { var notify = new Notification('Message on Scratchpad',{ body:data.query.pages[Object.keys(data.query.pages)[0]].revisions[0].user + ' has left a message on your talk page.' }); notify.onclick = function{ window.open('http://sp.wikia.com/wiki/User:Curiouscrab/talk'); } } }); // w:c:dev:AjaxRC window.ajaxPages = ['Special:RecentChanges']; window.ajaxRefresh = 15000; importScript('Mediawiki:AjaxRC/code.js'); // w:c:dev:FixLinks importScriptPage('Mediawiki:FixLinks/code.js','dev'); // w:c:dev:PrintableVersion // importScriptPage('Mediawiki:PrintableVersion/code.js','dev'); // w:c:dev:FindNReplace importScriptPage('Mediawiki:FindNReplace/code.js','dev'); // w:c:dev:Status importScriptPage('Mediawiki:Status/code.js','dev'); // 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); //}