summaryrefslogtreecommitdiffstats
path: root/public/js/album.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/album.js')
-rw-r--r--public/js/album.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/public/js/album.js b/public/js/album.js
index fe492af..dd54ed2 100644
--- a/public/js/album.js
+++ b/public/js/album.js
@@ -128,6 +128,22 @@ window.addEventListener('DOMContentLoaded', () => {
});
})();
+// Slideshow launch options (Shuffle / Full screen checkboxes next to the button)
+(function () {
+ const link = document.getElementById('ss-launch');
+ if (!link) return;
+ const base = link.dataset.base;
+ function update() {
+ const p = [];
+ if (document.getElementById('ss-opt-shuffle').checked) p.push('shuffle=1');
+ if (document.getElementById('ss-opt-fullscreen').checked) p.push('fullscreen=1');
+ link.href = base + (p.length ? '?' + p.join('&') : '');
+ }
+ ['ss-opt-shuffle', 'ss-opt-fullscreen'].forEach(id =>
+ document.getElementById(id).addEventListener('change', update)
+ );
+})();
+
// Touch swipe
(function () {
let startX = null;