From a8b2df43bd45cf5dcfb0b0359adf32dde9c5b536 Mon Sep 17 00:00:00 2001 From: Flo Greistorfer Date: Wed, 20 Aug 2025 08:42:35 +0200 Subject: [PATCH] moved item name replace --- templates/functionality.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/functionality.js b/templates/functionality.js index 37dccac..32b20d2 100644 --- a/templates/functionality.js +++ b/templates/functionality.js @@ -190,8 +190,7 @@ class PhotoGallery { const searchParams = new URLSearchParams(window.location.search); this.shown = []; let path = decodeURIComponent( - window.location.origin + - window.location.pathname.replace("index.html", "") + window.location.origin + window.location.pathname.replace("index.html", "") ); if (path.startsWith("null")) { path = window.location.protocol + "//" + path.substring(4); @@ -226,7 +225,7 @@ class PhotoGallery { if (include || selectedTags.length === 0) { if (!isRecursiveChecked) { - if (decodeURIComponent(item.src.replace(item.name, "")) === path) { + if (decodeURIComponent(item.src).replace(item.name, "") === path) { this.shown.push(item); } } else {