Skip to content

Commit 4794bd3

Browse files
jesserockzballoob
andauthored
When serial or ble button clicked, disable the other button (#46)
Co-authored-by: Paulus Schoutsen <[email protected]>
1 parent 48467c1 commit 4794bd3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/index.html

+9
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,13 @@ <h3>More Reading</h3>
164164
if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
165165
document.querySelector(".not-supported-i").classList.remove("hidden");
166166
}
167+
168+
const ble = document.querySelector('improv-wifi-launch-button');
169+
const serial = document.querySelector('improv-wifi-serial-launch-button');
170+
ble.addEventListener('click', () => {
171+
serial.outerHTML = '<button disabled>Disabled until page reload</button>';
172+
});
173+
serial.addEventListener('click', () => {
174+
ble.outerHTML = '<button disabled>Disabled until page reload</button>';
175+
});
167176
</script>

0 commit comments

Comments
 (0)