Fixed scrolling to comment when the comment ID is in the URL hash.
This commit is contained in:
@@ -78,6 +78,15 @@
|
|||||||
|
|
||||||
| {% block comment_scripts %}
|
| {% block comment_scripts %}
|
||||||
script.
|
script.
|
||||||
|
function scrollToLinkedComment() {
|
||||||
|
var scrollToId = location.hash;
|
||||||
|
if (scrollToId.length <= 1) return;
|
||||||
|
|
||||||
|
$(scrollToId)
|
||||||
|
.addClass('comment-linked')
|
||||||
|
.scrollHere();
|
||||||
|
}
|
||||||
|
$(scrollToLinkedComment);
|
||||||
|
|
||||||
// Markdown initialization
|
// Markdown initialization
|
||||||
var convert = new Markdown.getSanitizingConverter();
|
var convert = new Markdown.getSanitizingConverter();
|
||||||
|
Reference in New Issue
Block a user