Open main menu
Home
Random
Log in
Settings
About wiki
Terms and conditions of use
wiki
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 21:23, 18 April 2018
95 bytes added
,
21:23, 18 April 2018
no edit summary
Line 22:
Line 22:
dataType: 'json'
dataType: 'json'
}).done(function (data){
}).done(function (data){
+
console.log(data.query.userinfo);
+
var username = data.query.userinfo.name;
var currentLang = data.query.userinfo.options.language;
var currentLang = data.query.userinfo.options.language;
−
if(lang && lang != currentLang){
+
if(
username &&
lang && lang != currentLang){
$.ajax({
$.ajax({
url: 'api.php',
url: 'api.php',
Mark.wooff
Bureaucrats
,
Administrators
55
edits