Fixed scrolling to comment when the comment ID is in the URL hash.

This commit is contained in:
2017-09-13 14:05:18 +02:00
parent a8511c9db5
commit 9ac870e0a5

View File

@@ -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();