From 5c2eff09b85a10cff26eb298d1524381940e2732 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 12 Mar 2023 12:55:32 +0100 Subject: [PATCH] PhotoPage: apply #photo_frame anchor to clicks as well --- public/js/photonav.js | 4 ++-- templates/PhotoPage.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/photonav.js b/public/js/photonav.js index e9019f2..8d43dac 100644 --- a/public/js/photonav.js +++ b/public/js/photonav.js @@ -4,14 +4,14 @@ function enableKeyDownNavigation() { var target = document.getElementById("previous_photo").href; if (target) { event.preventDefault(); - document.location.href = target + '#photo_frame'; + document.location.href = target; } } else if (event.keyCode == 39) { var target = document.getElementById("next_photo").href; if (target) { event.preventDefault(); - document.location.href = target + '#photo_frame'; + document.location.href = target; } } }, false); diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 49ac58b..52b6fe5 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -84,14 +84,14 @@ class PhotoPage extends Template { if ($this->previous_photo_url) echo ' - '; + '; else echo ' '; if ($this->next_photo_url) echo ' - '; + '; else echo ' ';