aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-20 17:05:06 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-20 17:05:48 +0100
commit06b6eb91e09e4dfc3f207884d9004d28b882ce1f (patch)
tree71e38e3a10987f4d9fe4ae3a435b1edbaaa46fda
parent84fe041aa42981a3be4528170b324054b5438d5a (diff)
Hide export button in fullscreen mode.
(Clicking it exits fullscreen mode, which is undesired.)
-rw-r--r--main.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.js b/main.js
index 947d201..c0d0dfb 100644
--- a/main.js
+++ b/main.js
@@ -341,12 +341,23 @@ if (window.location !== window.parent.location) {
btn.classList.add(classActive);
btn.classList.remove(classInactive);
btn.title = titleActive;
+
+ const exp = document.getElementById('export-to-image');
+ if (exp !== undefined) {
+ /* hide export button in fullscreen mode as it exits it */
+ exp.classList.add('d-none');
+ }
})
control.addEventListener('leavefullscreen', function() {
const btn = control.element.getElementsByTagName('button')[0];
btn.classList.add(classInactive);
btn.classList.remove(classActive);
btn.title = titleInactive;
+
+ const exp = document.getElementById('export-to-image');
+ if (exp !== undefined) {
+ exp.classList.remove('d-none');
+ }
})
})();