Rev2180, Allow ajax requests using ajax_key http get parameter

This commit is contained in:
shortcutme 2017-08-15 02:40:38 +02:00
parent 0a380dc0ab
commit 1db2327b3d
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
6 changed files with 34 additions and 5 deletions

View file

@ -132,6 +132,8 @@ class Wrapper
window.history.replaceState(message.params[0], message.params[1], query)
else if cmd == "wrapperGetState"
@sendInner {"cmd": "response", "to": message.id, "result": window.history.state}
else if cmd == "wrapperGetAjaxKey"
@sendInner {"cmd": "response", "to": message.id, "result": window.ajax_key}
else if cmd == "wrapperOpenWindow"
@actionOpenWindow(message.params)
else if cmd == "wrapperPermissionAdd"

View file

@ -982,6 +982,12 @@ jQuery.extend( jQuery.easing,
"to": message.id,
"result": window.history.state
});
} else if (cmd === "wrapperGetAjaxKey") {
return this.sendInner({
"cmd": "response",
"to": message.id,
"result": window.ajax_key
});
} else if (cmd === "wrapperOpenWindow") {
return this.actionOpenWindow(message.params);
} else if (cmd === "wrapperPermissionAdd") {