Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 13:23, 20 April 2018
87 bytes removed
,
13:23, 20 April 2018
no edit summary
Line 17:
Line 17:
var lang = getCookie('lang');
var lang = getCookie('lang');
−
console.log('current lang: ' + lang);
$.ajax({
$.ajax({
Line 70:
Line 69:
mw.hook('mw.uls.interface.language.change').add(function (lang){
mw.hook('mw.uls.interface.language.change').add(function (lang){
−
console.log('lang changed to: ' + lang);
$.ajax({
$.ajax({
url: 'api.php',
url: 'api.php',
Line 86:
Line 84:
var userid = data.query.userinfo.id;
var userid = data.query.userinfo.id;
var currentLang = data.query.userinfo.options.language;
var currentLang = data.query.userinfo.options.language;
+
setCookie('lang', lang);
if(userid != 0 && lang != currentLang){
if(userid != 0 && lang != currentLang){
−
setCookie('lang', lang);
$.ajax({
$.ajax({
url: 'api.php',
url: 'api.php',
Mark.wooff
Bureaucrats
,
Administrators
55
edits
Navigation menu
GC
wiki
Personal tools
English
Log in
Namespaces
Message
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main Page
Browse categories
Random page
Help
Actions/Tools
Special pages
Tools
Printable version
GCaccount
GCcollab
GCmessage