User:Takecommand/chatFix.js

/* chatFix.js * * Author: Jay Software * Date Created: 10/29/12 * Version: 0.2 * Build: 1.3.0 * * 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 * - * 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; reload }     else {       window.hasFocus = true; // add in next major version }