Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
resolve(data); | resolve(data); | ||
data=JSON.parse(data); | data=JSON.parse(data); | ||
− | $('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data. | + | $('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data.org.abbr+'logo.png")'); |
qc(data); | qc(data); | ||
}, | }, |
Revision as of 16:23, 17 May 2021
"use strict"; $(document).ready(function () { function ajaxPOST(json) { return new Promise(function (resolve, reject) { $.ajax({ url: '/w/qc.php', type: 'POST', data: json, //contentType: 'application/json; charset=utf-8', contentType: 'application/x-www-form-urlencoded', success: function (data) { resolve(data); data=JSON.parse(data); $('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data.org.abbr+'logo.png")'); qc(data); }, error: function (err) { reject(err); } }); }); } ajaxPOST(RLCONF); });