Skip to content

Instantly share code, notes, and snippets.

View ohasy's full-sized avatar
🌴
On vacation

Ya ohasy

🌴
On vacation
View GitHub Profile
@ohasy
ohasy / ajaxListener.js
Last active April 13, 2023 12:17 — forked from icodejs/ajaxListener.js
JS: Listen to ajax call and download quickly expiring presigned s3 urls (do not paste twice in the console)
var openOrig = window.XMLHttpRequest.prototype.open,
sendOrig = window.XMLHttpRequest.prototype.send,
onReadyStateChange;
function openReplacement(method, url, async, user, password) {
var syncMode = async !== false ? 'async' : 'sync';
console.warn(
'Preparing ' +
syncMode +
' HTTP request : ' +