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 22:47, 18 April 2018
80 bytes added
,
22:47, 18 April 2018
no edit summary
Line 15:
Line 15:
var lang = getCookie('lang');
var lang = getCookie('lang');
+
console.log('lang: ' + lang);
$.ajax({
$.ajax({
Line 32:
Line 33:
var currentLang = data.query.userinfo.options.language;
var currentLang = data.query.userinfo.options.language;
−
if(userid != 0 && lang && lang != currentLang){
+
if(userid != 0 && lang
!= ""
&& lang != currentLang){
$.ajax({
$.ajax({
url: 'api.php',
url: 'api.php',
Line 107:
Line 108:
mw.hook('mw.uls.interface.language.change').add(function (lang){
mw.hook('mw.uls.interface.language.change').add(function (lang){
+
console.log('lang change to: ' + lang);
setCookie('lang', lang);
setCookie('lang', lang);
$.ajax({
$.ajax({
Mark.wooff
Bureaucrats
,
Administrators
55
edits