I created some Regular expressions to change the exported script, if anyone have the same problem
search "^(.*)var (.*) = new Image\\(\\)\\;",
replace "$1var $2 = new Image()/**/;\r\n$1$2.crossOrigin = 'anonymous';"
search "^(.*) = new Image\\(\\)\\;",
replace "$1 = new Image()/**/;\r\n$1.crossOrigin = 'anonymous';"
search "\"images/",
replace "\"http://your url here/images/"
search "\"media/",
replace "\"http://your url here/media/"
you can change the http:// to // if you want to work in both http and https, but I haven't tested yet