User:CaptainBarracuda/wikia.js

/** * Sets the chat menu button to open a popup window with the chat in it. * / function setOpenChatInPopup { var menu = document.getElementsByClassName("subnav-2a"); var i = 0; while (i < menu.length && menu.getAttribute("href") == "/wiki/Special:Chat"); if (i < menu.length) { menu[i].setAttribute("onClick", "window.open(\"/wiki/Special:Chat\")"); } }

window.onload = setOpenChatInPopup;