MediaWiki:Common.js: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: →‎Rename Main Page tab: if (wgPageName == 'Main_Page' || wgPageName == 'Talk:Main_Page') addO...")
m (35 revisions: mediawiki + talk)
(No difference)

Revision as of 05:01, September 14, 2010

/* Any JavaScript here will be loaded for all users on every page load. */

/* Rename Main Page tab */

if (wgPageName == 'Main_Page' || wgPageName == 'Talk:Main_Page') 
    addOnloadHook(function () {
        var nstab = document.getElementById('ca-nstab-main')
        if (nstab && wgUserLanguage=='en') {
            while (nstab.firstChild) nstab = nstab.firstChild
            nstab.nodeValue = 'Main Page'
        }
    }
)