summaryrefslogtreecommitdiff
path: root/web/source/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/frontend')
-rw-r--r--web/source/frontend/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/source/frontend/index.js b/web/source/frontend/index.js
index 2a54d52b6..b1187f515 100644
--- a/web/source/frontend/index.js
+++ b/web/source/frontend/index.js
@@ -22,6 +22,14 @@ const Photoswipe = require("photoswipe/dist/umd/photoswipe.umd.min.js");
const PhotoswipeLightbox = require("photoswipe/dist/umd/photoswipe-lightbox.umd.min.js");
const PhotoswipeCaptionPlugin = require("photoswipe-dynamic-caption-plugin").default;
+let [_, _user, type, id] = window.location.pathname.split("/");
+if (type == "statuses") {
+ let firstStatus = document.getElementsByClassName("thread")[0].children[0];
+ if (firstStatus.id != id) {
+ document.getElementById(id).scrollIntoView();
+ }
+}
+
const lightbox = new PhotoswipeLightbox({
gallery: '.photoswipe-gallery',
children: 'a',