Skip to content

Instantly share code, notes, and snippets.

@rolfen
rolfen / ajaxListener.js
Last active October 10, 2017 15:15 — forked from icodejs/ajaxListener.js
JS: Listen to ajax calls from Javascript
// override XMLHttpRequest
// source: https://gist.github.com/icodejs/3183154
var open = window.XMLHttpRequest.prototype.open,
send = window.XMLHttpRequest.prototype.send;
function openReplacement(method, url, async, user, password) {
return open.apply(this, arguments);
}