Jump to content

User:Vector Potential/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[User:Vector Potential/popups.js]]

importScript('User:Vector Potential/popups.js');
$(function(){
    /* Fix the title of the history page */
    if(wgAction=='history'){
        document.title=wgPageName.replace(/_/g,' ')+' - Wikipedia History';
        var h=document.getElementsByTagName('H1');
        if(h.length){
            h=h[0];
            while(h.firstChild) h.removeChild(h.firstChild);
            h.appendChild(document.createTextNode(wgPageName.replace(/_/g,' ')));
        }
    }
});