MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / monkeyPatchAjax

Method monkeyPatchAjax

plugins/ContentFilter/media/js/ZeroFrame.js:109–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 1

cmdMethod · 0.95

Tested by

no test coverage detected