MediaWiki:QuickAccessToGlobalPages/code.js

/* QuickAccessToGlobalPages * Original code by User:JPhil2.0 (can be found in http://community.wikia.com/wiki/User:JPhil2.0/global.js?diff=2017878&oldid=2017872) * Modified and fixed by User:Ultragustavo25 */ if(!window.CustomButtonsLoaded) addOnloadHook(addCustomLinks); var CustomButtonsLoaded = true; var i18n = { en: { js: "Global JS", css: "Global CSS" },   'pt-br': { js: "JS global", css: "CSS global" },   pt: { js: "JS global", css: "CSS global" } } i18n = i18n[mw.config.get("wgUserLanguage")] || i18n[mw.config.get("wgContentLanguage")] || i18n.en; function addCustomLinks { $('' + i18n.js + '').insertBefore('.wds-global-navigation__user-menu li:last'); $('' + i18n.css + '').insertBefore('.wds-global-navigation__user-menu li:last'); }