From f925e1c40d06f10c879edd6ee5772a131b5ac0ec Mon Sep 17 00:00:00 2001 From: Elijah Bansley Date: Sun, 21 Oct 2018 13:44:39 -0500 Subject: [PATCH] Added a fetch function --- main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 208bfe9..77e4409 100644 --- a/main.js +++ b/main.js @@ -147,7 +147,15 @@ document.getElementById("goButton").addEventListener("click", async () => { let payload; if (payloadType === "CTCaer_Hekate") { - payload = CTCaer_Hekate; +var xhr = new XMLHttpRequest(); +xhr.open("GET", "https://github.com/ElijahZAwesome/web-cfw-loader/raw/master/hekate_ctcaer_4.2.bin"); +xhr.responseType = "blob";//force the HTTP response, response-type header to be blob +xhr.onload = function() +{ + payload = xhr.response;//xhr.response is now a blob object +} +xhr.send(); + //payload = CTCaer_Hekate; } else if (payloadType === "fusee") { payload = fusee;