diff options
Diffstat (limited to 'public/js')
| -rw-r--r-- | public/js/album.js | 3 | ||||
| -rw-r--r-- | public/js/slideshow.js | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/public/js/album.js b/public/js/album.js index a2301c9..c3f775f 100644 --- a/public/js/album.js +++ b/public/js/album.js @@ -129,6 +129,8 @@ window.addEventListener('DOMContentLoaded', () => { const p = []; if (document.getElementById('ss-opt-shuffle')?.checked) p.push('shuffle=1'); if (document.getElementById('ss-opt-fullscreen')?.checked) p.push('fullscreen=1'); + const iv = parseFloat(document.getElementById('ss-opt-interval')?.value); + if (iv && iv !== 5) p.push('interval=' + iv); if (input && input.value.trim()) { const visible = [...document.querySelectorAll('#album-grid .album-card')] .filter(c => c.style.display !== 'none') @@ -153,6 +155,7 @@ window.addEventListener('DOMContentLoaded', () => { ['ss-opt-shuffle', 'ss-opt-fullscreen'].forEach(id => document.getElementById(id)?.addEventListener('change', updateSsLink) ); + document.getElementById('ss-opt-interval')?.addEventListener('input', updateSsLink); })(); // Touch swipe diff --git a/public/js/slideshow.js b/public/js/slideshow.js index d1a0a95..ddcaa3c 100644 --- a/public/js/slideshow.js +++ b/public/js/slideshow.js @@ -203,6 +203,10 @@ const ssParams = new URLSearchParams(location.search); if (ssParams.get('shuffle') === '1') { ssQueue = shuffle(SS_ENTRIES); } +const ivParam = parseFloat(ssParams.get('interval')); +if (ivParam >= 1 && ivParam <= 60) { + document.getElementById('ss-interval').value = ivParam; +} if (ssQueue.length > 0) { ssShow(0, true); |
