Last active
October 29, 2019 20:30
-
-
Save ner00/8636aedaafae436ed77d885352722f70 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
//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