diff options
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) }; |
