Update main.js

pull/17/head
Elijah Bansley 2018-06-24 08:45:33 -05:00 committed by GitHub
parent 94af1940f4
commit fabc75d9eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -133,6 +133,8 @@ document.getElementById("goButton").addEventListener("click", async () => {
var debugCheckbox = document.getElementById("shouldDebug");
const payloadType = document.getElementById("payloadSelect").value;
if(!debugCheckbox.checked) {
logOutput("Requesting access to device...");
try {
device = await navigator.usb.requestDevice({ filters: [{ vendorId: 0x0955 }] });
@ -141,6 +143,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
logOutput("Failed to get a device. Did you chose one?");
return;
}
}
let payload;
if (payloadType === "hekate v5") {