Open main menu
Home
Random
Log in
Settings
About wiki
Terms and conditions of use
wiki
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 14:05, 18 April 2018
371 bytes removed
,
14:05, 18 April 2018
no edit summary
Line 11:
Line 11:
var apiURL = 'https://wiki.gccollab.ca/api.php';
var apiURL = 'https://wiki.gccollab.ca/api.php';
−
var originURL = 'https://wiki.gccollab.ca';
−
−
$.ajax({
−
url: apiURL,
−
data: {
−
action: 'query',
−
meta: 'userinfo',
−
format: 'json',
−
origin: originURL
−
},
−
xhrFields: {
−
withCredentials: true
−
},
−
dataType: 'json'
−
}).done(function (data){
−
console.log(data);
−
});
−
$.ajax({
$.ajax({
Line 35:
Line 17:
action: 'query',
action: 'query',
meta: 'tokens',
meta: 'tokens',
−
format: 'json'
,
+
format: 'json'
−
origin: originURL
},
},
xhrFields: {
xhrFields: {
Line 45:
Line 26:
console.log(data);
console.log(data);
$.ajax({
$.ajax({
−
url: apiURL
+ '?origin=' + originURL
,
+
url: apiURL,
method: 'POST',
method: 'POST',
data: {
data: {
Mark.wooff
Bureaucrats
,
Administrators
55
edits