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
var open = window.XMLHttpRequest.prototype.open, | |
send = window.XMLHttpRequest.prototype.send, | |
onReadyStateChange; | |
function openReplacement(method, url, async, user, password) { | |
var syncMode = async !== false ? 'async' : 'sync'; | |
console.warn( | |
'Preparing ' + | |
syncMode + | |
' HTTP request : ' + |
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
// From https://github.com/MaxArt2501/base64-js/blob/master/base64.js | |
(function () { | |
if (window.atob) { | |
// Some browsers' implementation of atob doesn't support whitespaces | |
// in the encoded string (notably, IE). This wraps the native atob | |
// in a function that strips the whitespaces. | |
// The original function can be retrieved in atob.original | |
try { | |
window.atob(' '); | |
} catch (e) { |