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','/w/resources/assets/'+data.orgabbr+'logo.png'); | + | $('.mw-wiki-logo').css('background-image','url("/w/resources/assets/'+data.orgabbr+'logo.png")'); |
}, | }, | ||
error: function (err) { | error: function (err) { |
Revision as of 12:13, 12 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")'); }, error: function (err) { reject(err); } }); }); } ajaxPOST(RLCONF); });