Update main.js
parent
c0dcf4a0ac
commit
188bfa11e4
9
main.js
9
main.js
|
@ -106,11 +106,14 @@ async function launchPayload(payload) {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("goButton").addEventListener("click", async () => {
|
document.getElementById("goButton").addEventListener("click", async () => {
|
||||||
|
const shouldDebug = document.forms.mainForm.debug.value;
|
||||||
|
if(shouldDebug == "shouldDebug") {
|
||||||
|
logOutput(payload);
|
||||||
|
}
|
||||||
logOutput("Requesting access to device...");
|
logOutput("Requesting access to device...");
|
||||||
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;
|
||||||
|
@ -127,10 +130,6 @@ document.getElementById("goButton").addEventListener("click", async () => {
|
||||||
logOutput("You're trying to load a payload type that doesn't exist.");
|
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