Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
type: 'POST', | type: 'POST', | ||
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:05, 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); });