From 233337b8a42d4d0893502343df69af251e0b75d1 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 18 Jun 2022 00:06:42 +0200 Subject: Hide unnecessary UI elements in lightbox --- content/lightbox.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'content') diff --git a/content/lightbox.js b/content/lightbox.js index a415930..66facd6 100644 --- a/content/lightbox.js +++ b/content/lightbox.js @@ -94,6 +94,12 @@ setIndex(0); + if (figureEls.length <= 1) { + lightboxPrevEl.remove(); + lightboxNextEl.remove(); + lightboxFooterEl.remove(); + } + if (closeable) { document.addEventListener('mousedown', (e) => { if (visible) { -- cgit v1.2.3-54-g00ecf