User:Firedance/common.js

if (mw.config.get("wgCanonicalSpecialPageName") == "Chat") { $.getJSON(mw.config.get("wgServer") + "/wikia.php?controller=WallNotificationsExternal&method=getUpdateCounts&format=json", function(data) {       function Alert(msg [, ti]) {         // msg = the message, ti= time interval between title changes(default is 1.5s)            var intervalId, oldTitle = document.title;            intervalId = setInterval(function{ document.title = document.title == msg ? oldTitle : msg; }, ti ? ti : 1500);           return function {            if(oldTitle) {                clearInterval(intervalId);                document.title = oldTitle;            oldTitle = intervalId = null;            }            };        }    }); }