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 13:57, 18 April 2018
67 bytes added
,
13:57, 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({
$.ajax({
Line 18:
Line 19:
meta: 'userinfo',
meta: 'userinfo',
format: 'json',
format: 'json',
−
origin:
'*'
+
origin:
originURL
},
},
xhrFields: {
xhrFields: {
Line 35:
Line 36:
meta: 'tokens',
meta: 'tokens',
format: 'json',
format: 'json',
−
origin:
'*'
+
origin:
originURL
},
},
xhrFields: {
xhrFields: {
Line 44:
Line 45:
console.log(data);
console.log(data);
$.ajax({
$.ajax({
−
url: apiURL + '?origin=
*
',
+
url: apiURL + '?origin='
+ originURL
,
method: 'POST',
method: 'POST',
data: {
data: {
Mark.wooff
Bureaucrats
,
Administrators
55
edits