diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 17:17:52 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 17:17:52 +0100 |
| commit | d4b1130931a430395b4172c28130693cc05c77c0 (patch) | |
| tree | f7532919ef301cf338e3712a9d98860610039751 /static/app.js | |
| parent | 766251ed6dc1858b544aa1c50de72b93d10b84d4 (diff) | |
| download | deck-it-d4b1130931a430395b4172c28130693cc05c77c0.tar.gz deck-it-d4b1130931a430395b4172c28130693cc05c77c0.zip | |
feat(xbox): switch to the Xbox tab once per game session
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/app.js')
| -rw-r--r-- | static/app.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/static/app.js b/static/app.js index 5d1688a..bb30814 100644 --- a/static/app.js +++ b/static/app.js @@ -89,10 +89,12 @@ function showTab(name) { // A panel's peek(state) gives seconds when something new turned up: its tab // comes forward that long, then the page goes back, unless touched first. +// Infinity brings it forward to stay, as a page change by hand would. let peek = null; // {back, timer} while a tab is shown on its own function peekTab(name, seconds) { const now = Object.keys(tabs).find((n) => !tabs[n].section.hidden); if (now === name && !peek) return; // already there by choice + if (!Number.isFinite(seconds)) return showTab(name); const back = peek?.back ?? now; showTab(name); peek = { back, timer: setTimeout(() => showTab(back), seconds * 1000) }; |
