Skip to content

Commit 451afbb

Browse files
committed
allow ?dev_id=BANGLEJS2 to remove the initial popup menu
1 parent a26a32a commit 451afbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ function setSavedDeviceId(deviceId) {
143143

144144
// At boot, show a window to choose which type of device you have...
145145
window.addEventListener('load', (event) => {
146+
if (window.location.search) {
147+
let searchParams = new URLSearchParams(window.location.search);
148+
if (searchParams.has("dev_id")) // dev_id=BANGLEJS2 for example, to stop the popup
149+
setSavedDeviceId(searchParams.get("dev_id"));
150+
}
151+
146152
let deviceId = getSavedDeviceId()
147153
if (deviceId !== undefined) return; // already chosen
148154

0 commit comments

Comments
 (0)