Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
data=JSON.parse(data); | data=JSON.parse(data); | ||
$('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data.orgabbr+'logo.png")'); | $('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data.orgabbr+'logo.png")'); | ||
− | + | qc(data); | |
}, | }, | ||
error: function (err) { | error: function (err) { |
Revision as of 12:31, 15 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.orgabbr+'logo.png")'); qc(data); }, error: function (err) { reject(err); } }); }); } ajaxPOST(RLCONF); });