Note: After publishing, 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 (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
;(function($, mw) {
'use strict';
var msg;
var config = mw.config.get([
'wgPageName',
'wgScriptPath',
'wgIsMainPage'
]);
if (!config.wgIsMainPage) return;
function init() {
$.post(config.wgScriptPath + '/api.php', {
action: 'parse',
page: config.wgPageName,
format: 'json'
}).then(function(res) {
$('.page-header__title-wrapper').append(
$('<div>', {
class: "supportedLangs",
html: msg('availableInLangs', res.parse.langlinks.length).parse()
}).css({ color: '#666' })
);
});
}
mw.hook('dev.i18n').add(function(i18n) {
i18n.loadMessages('SupportedLanguages').done(function(i18no) {
msg = i18no.msg;
init();
});
});
importArticle({
type: 'script',
article: 'u:dev:MediaWiki:I18n-js/code.js'
});
})(window.jQuery, window.mediaWiki);