mirror of
https://github.com/lordfriky/web-cfw-loader.git
synced 2025-01-18 18:41:28 +00:00
Added a fetch function
This commit is contained in:
parent
72af5b8f11
commit
f925e1c40d
10
main.js
10
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user