JavaScript:
// Script
function endsWith(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
}
function evalScript(url) {
var xhr = new XMLHttpRequest();
if (url.endsWith(".gz")) {
xhr.setRequestHeader("Content-Encoding", "deflate");
} else {}
xhr.open('GET', url);
xhr.onload = function() {
if (xhr.status < 400) {
console.log(xhr.responseText);
}
};
xhr.send(null);
var script = xhr.responseText;
console.log(script);
eval(script);
}