Skip to content

Instantly share code, notes, and snippets.

@ner00
Last active October 29, 2019 20:30
Show Gist options
  • Save ner00/8636aedaafae436ed77d885352722f70 to your computer and use it in GitHub Desktop.
Save ner00/8636aedaafae436ed77d885352722f70 to your computer and use it in GitHub Desktop.
//https://archive.org/details/softwarelibrary_msdos_games
if (window.location.href.indexOf(document.domain + "/details/msdos") > -1) {
var scripts = document.querySelectorAll("script");
for (var i = 0; i < scripts.length; i++) {
var emuLoader = "" + scripts[i].text;
if (emuLoader.indexOf("AJS.emulate_setup") != -1) {
emuLoader = emuLoader.substring(emuLoader.indexOf("\/"));
emuLoader = emuLoader.replace("\\", "");
emuLoader = emuLoader.substring(0, emuLoader.indexOf("?"));
var response = "";
$.ajax({ type: "GET",
url: "https://" + document.domain + emuLoader,
async: false,
success : function(text) {
response = text;
response = response.substring(response.indexOf("https"));
response = response.substring(0, response.indexOf(")"));
/*
console.log("Download repository: " + response);
window.open(response, "_blank");
*/
if (confirm("Browse this game's repository?")) {
window.location.href = response;
}
}
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment