MediaWiki:Gadget-ChChange.js

"Wikiibíídiiya" bitsʼą́ą́dę́ę́ʼ

Note: After saving, you may have to bypass your browser's cache to see the changes. Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Mac). Google Chrome: press Ctrl-Shift-R (Command-Shift-R on a Mac). Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5. Konqueror: click Reload or press F5. Opera: clear the cache in Tools → Preferences

/* 
An experimental gadget to override the way Namespaces are displayed.
User:Seb_az86556 (March 2010)
Updated April 2010 (category-namespace only)
*/

/* switch "category" page displayed title to 'Naaltsoos biiʼ sinilí:' */
if (mw.config.get('wgCanonicalNamespace') == "Category")
$(function () {
        var title = document.getElementById('firstHeading')
        if (title && wgUserLanguage=='nv') {
            while (title.firstChild) title = title.firstChild
            title.nodeValue = 'Naaltsoos biiʼ sinilí:' + mw.config.get('wgPageName').substring(19)
        }
    }
)
/* switch "category talk" page displayed title to 'Naaltsoos biiʼ sinilí baa yáshtiʼ:' */
if (mw.config.get('wgCanonicalNamespace') == "Category_talk")
$(function () {
        var title = document.getElementById('firstHeading')
        if (title && wgUserLanguage=='nv') {
            while (title.firstChild) title = title.firstChild
            title.nodeValue = 'Naaltsoos biiʼ sinilí baa yáshtiʼ:' + mw.config.get('wgPageName').substring(34)
        }
    }
)