mirror of
https://github.com/lordfriky/web-cfw-loader.git
synced 2024-12-28 16:11:55 +00:00
Update main.js
This commit is contained in:
parent
969165a779
commit
f8922c89ae
7
main.js
7
main.js
@ -110,6 +110,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||||||
device = await navigator.usb.requestDevice({ filters: [{ vendorId: 0x0955 }] });
|
device = await navigator.usb.requestDevice({ filters: [{ vendorId: 0x0955 }] });
|
||||||
|
|
||||||
const payloadType = document.forms.mainForm.payload.value;
|
const payloadType = document.forms.mainForm.payload.value;
|
||||||
|
const shouldDebug = document.forms.mainForm.debug.value;
|
||||||
logOutput(`Preparing to launch ${payloadType}...`);
|
logOutput(`Preparing to launch ${payloadType}...`);
|
||||||
|
|
||||||
let payload;
|
let payload;
|
||||||
@ -123,9 +124,13 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
|||||||
}
|
}
|
||||||
payload = new Uint8Array(await readFileAsArrayBuffer(file));
|
payload = new Uint8Array(await readFileAsArrayBuffer(file));
|
||||||
} else {
|
} else {
|
||||||
console.log("how?");
|
logOutput("You're trying to load a payload type that doesn't exist.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(shouldDebug == "shouldDebug") {
|
||||||
|
logOutput(payload);
|
||||||
|
}
|
||||||
|
|
||||||
launchPayload(payload);
|
launchPayload(payload);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user