From 06b6eb91e09e4dfc3f207884d9004d28b882ce1f Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 20 Jan 2024 17:05:06 +0100 Subject: Hide export button in fullscreen mode. (Clicking it exits fullscreen mode, which is undesired.) --- main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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'); + } }) })(); -- cgit v1.2.3