Created
July 7, 2021 21:26
-
-
Save toriato/29dbc070c3c2f7ff71e44321e2019a01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XMLHttpRequest.prototype._open = XMLHttpRequest.prototype.open | |
XMLHttpRequest.prototype._send = XMLHttpRequest.prototype.send | |
XMLHttpRequest.prototype.open = function () { | |
/* codes... */ | |
this.hooked = true | |
console.log(...arguments) | |
return this._open(...arguments) | |
} | |
XMLHttpRequest.prototype.send = function () { | |
if (this.hooked === true) { | |
console.log(...arguments) | |
} | |
return this._open(...arguments) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment