User:Stefan04/global.js

if (wgUserLanguage != wgPageContentLanguage) {

/*

mw.loader.using('mediawiki.api', function {    var api = new mw.Api;    api.get({ action: 'tokens', type: 'options' }).done(function (json) { api.post({       action: 'options',        change: 'wplanguage='.concat(wgPageContentLanguage),        token: json.tokens.optionstoken      }); }); });  */

if (location.href.indexOf('\?') == -1) location.href=location.href+'?uselang=' + wgPageContentLanguage; else location.href=location.href+'&uselang=' + wgPageContentLanguage; if (location.href.indexOf('action=submit') =! -1 && location.href.indexOf('#') != -1) location.href = url[0] + url[1]; }