From a490761ad3f1a111a4d662db22b8de5a9d249de6 Mon Sep 17 00:00:00 2001 From: Elijah Bansley Date: Thu, 17 May 2018 23:24:33 -0500 Subject: [PATCH] Update main.js --- main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.js b/main.js index 7d0165e..0d27a62 100644 --- a/main.js +++ b/main.js @@ -168,4 +168,12 @@ document.getElementById("goButton").addEventListener("click", async () => { launchPayload(payload); }); +document.getElementById("infobutton").addEventListener("onclick", function() { + if(document.getElementById("infodiv").innerHTML != "") { + document.getElementById("infodiv").innerHTML = ""; + } else { + document.getElementById("infodiv").innerHTML = "

Instructions:

Put the Switch in RCM, and connect it to your device.

Select either the example payload, or upload one.

Press 'Run Payload!'

On the consent screen that appears, select 'APX' and hit confirm.

If all goes well, the payload will launch!

Info:

This is moderately tested. Although no issues have been discovered, I'm not responsible if anything goes wrong!

This does NOT work on Windows due to a limitation in the Chrome implementation of WebUSB (and probably other reasons!)

This does NOT currently work on any browser but Chrome, because they don't implement WebUSB.

On Linux, you might get an access denied error!If you do, you can try creating a file at /etc/udev/rules.d/50-switch.rulesWith the following contents:
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"

Hekate for 4.x has not been tested, as I do not have a 4.x switch. However, all other payloads will be tested as they are uploaded.

This has been tested and appears to work on Linux, OSX, Android (unrooted) and Chromebooks. Your mileage may vary.

"); + } +} + document.getElementById("payloadUpload").addEventListener("change", () => document.forms.mainForm.payload.value = "uploaded");