diff --git a/src/templates/nodes/custom/comment/list_embed.pug b/src/templates/nodes/custom/comment/list_embed.pug index 398f2dac..cb328689 100644 --- a/src/templates/nodes/custom/comment/list_embed.pug +++ b/src/templates/nodes/custom/comment/list_embed.pug @@ -78,6 +78,15 @@ | {% block comment_scripts %} script. + function scrollToLinkedComment() { + var scrollToId = location.hash; + if (scrollToId.length <= 1) return; + + $(scrollToId) + .addClass('comment-linked') + .scrollHere(); + } + $(scrollToLinkedComment); // Markdown initialization var convert = new Markdown.getSanitizingConverter();