User:JayJayJohnson/chatFix.js

/* chatFix.js * * Author: JayJayJohnson * Date Created: 10/29/12 * Version: 0.2 * Build: 1.2.5 * Latest Update: 12/28/12 * * Fixes random chat crashing. If hasFocus = false it will reload the page. * === FEATURES TO ADD === * -dynamically check hasFocus * -if hasFocus=true null * === BUGS/PROBLEMS === * -if hasFocus=true after checking hasFocus it will freeze the chat. * -occasionally will crash * - * Wrap build 1.2.5 into 0.3, then go over to 1.3.0 and continue. Builds will be * released when needed, usually when Wikia has a major upgrade to chat. * - * For use, enter this: * importScript('User:JayJayJohnson/chatFix.js'); * into your Chat.js page [e.g: User:YourName/Chat.js] */ if(wgCanonicalSpecialPageName == 'Chat') { window.hasFocus = false; refresh }     else {       window.hasFocus = true; // add in next major version }