Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
data: json, | data: json, | ||
//contentType: 'application/json; charset=utf-8', | //contentType: 'application/json; charset=utf-8', | ||
− | + | contentType: 'application/x-www-form-urlencoded', | |
success: function (data) { | success: function (data) { | ||
resolve(data); | resolve(data); |
Revision as of 00:06, 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); console.log(data); }, error: function (err) { reject(err); } }); }); } ajaxPOST(RLCONF); });