Skip to content

Commit

Permalink
When serial or ble button clicked, disable the other button (#46)
Browse files Browse the repository at this point in the history
Co-authored-by: Paulus Schoutsen <[email protected]>
  • Loading branch information
jesserockz and balloob authored Oct 16, 2024
1 parent 48467c1 commit 4794bd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,13 @@ <h3>More Reading</h3>
if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
document.querySelector(".not-supported-i").classList.remove("hidden");
}

const ble = document.querySelector('improv-wifi-launch-button');
const serial = document.querySelector('improv-wifi-serial-launch-button');
ble.addEventListener('click', () => {
serial.outerHTML = '<button disabled>Disabled until page reload</button>';
});
serial.addEventListener('click', () => {
ble.outerHTML = '<button disabled>Disabled until page reload</button>';
});
</script>

0 comments on commit 4794bd3

Please sign in to comment.