User:Stefan04/global.js

if (wgUserLanguage != wgPageContentLanguage) {

mw.loader.using('mediawiki.api', function {    var api = new mw.Api;    api.postWithToken('edit', { action: 'options', change: 'language=' + wgPageContentLanguage }).done(function(data) {}); });

/*

if (location.href.indexOf('\?') == -1 && location.href.indexOf('action=submit') == -1 && location.href.indexOf('#') == -1) location.href=location.href+'?uselang=' + wgPageContentLanguage; else if (location.href.indexOf('action=submit') == -1 && location.href.indexOf('#') == -1) location.href=location.href+'&uselang=' + wgPageContentLanguage;

*/

}