()
| 107 | } |
| 108 | |
| 109 | monkeyPatchAjax() { |
| 110 | var page = this |
| 111 | XMLHttpRequest.prototype.realOpen = XMLHttpRequest.prototype.open |
| 112 | this.cmd("wrapperGetAjaxKey", [], (res) => { this.ajax_key = res }) |
| 113 | var newOpen = function (method, url, async) { |
| 114 | url += "?ajax_key=" + page.ajax_key |
| 115 | return this.realOpen(method, url, async) |
| 116 | } |
| 117 | XMLHttpRequest.prototype.open = newOpen |
| 118 | } |
| 119 | } |