Update main.js

pull/1/merge
Elijah Bansley 2018-05-17 08:29:39 -05:00 committed by GitHub
parent c0dcf4a0ac
commit 188bfa11e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -106,11 +106,14 @@ async function launchPayload(payload) {
}
document.getElementById("goButton").addEventListener("click", async () => {
const shouldDebug = document.forms.mainForm.debug.value;
if(shouldDebug == "shouldDebug") {
logOutput(payload);
}
logOutput("Requesting access to device...");
device = await navigator.usb.requestDevice({ filters: [{ vendorId: 0x0955 }] });
const payloadType = document.forms.mainForm.payload.value;
const shouldDebug = document.forms.mainForm.debug.value;
logOutput(`Preparing to launch ${payloadType}...`);
let payload;
@ -128,10 +131,6 @@ document.getElementById("goButton").addEventListener("click", async () => {
return;
}
if(shouldDebug == "shouldDebug") {
logOutput(payload);
}
launchPayload(payload);
});