From d3d4e3cc8dcefec3d5cafa707e872234dae49340 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 12 Jul 2017 21:53:26 -0500 Subject: [PATCH] Fix #3216: Allow note URL # anchors to work from the post itself --- app/assets/javascripts/notes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index a4c023f5d..c55f1ef9f 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -141,6 +141,7 @@ Danbooru.Note = { var note_id = $note_box.data("id"); Danbooru.Note.Body.show(note_id); + $(".note-box-highlighted").removeClass("note-box-highlighted"); $note_box.addClass("note-box-highlighted"); Danbooru.scroll_to($note_box); }, @@ -800,6 +801,7 @@ Danbooru.Note = { this.initialize_shortcuts(); this.initialize_highlight(); + $(window).on("hashchange", this.initialize_highlight); }, initialize_shortcuts: function() {