Last active
June 9, 2017 21:33
-
-
Save matedemorphy/1f6327cded1e07a2e4bd26be82dae1b6 to your computer and use it in GitHub Desktop.
This file contains 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
function loadImageErrorOverride(errEvt) { | |
var pic = errEvt.target; | |
if (!pic.crossOrigin) return print('Failed to reload ' + pic.src + '!'); | |
print('Attempting to reload it as a tainted image now...'); | |
pic.crossOrigin = null, pic.src = pic.src; | |
} | |
function loadImageBypass(URL) { | |
var img; | |
return loadImage(URL, | |
function (pic) { print(img = pic), redraw(); }, | |
loadImageErrorOverride); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment