From bfc2552841ce0a018e70dae16fddf690a892b49d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 24 Sep 2016 20:10:20 -0700 Subject: more infrastructure for notification auto-scroll to comment --- view/js/main.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index f415637bd..227f0b7fe 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -249,6 +249,7 @@ var divmore_height = 400; var last_filestorage_id = null; var mediaPlaying = false; var contentHeightDiff = 0; +var gotoAnchor = ((document.location.hash.includes('item_')) ? document.location.hash : ''); $(function() { $.ajaxSetup({cache: false}); @@ -650,6 +651,11 @@ function updateConvItems(mode,data) { collapseHeight(); } + if(gotoAnchor != '') { + document.location.hash = gotoAnchor; + gotoAnchor = ''; + } + } function collapseHeight() { -- cgit v1.2.3