Skip to content

Commit

Permalink
修改js
Browse files Browse the repository at this point in the history
  • Loading branch information
liangliangyy committed Sep 17, 2023
1 parent c3b6e3c commit 10ed972
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 11 additions & 0 deletions blog/static/blog/js/blog.js
Expand Up @@ -71,6 +71,17 @@ $(document).on('webkitAnimationEnd', function () {
}, 400);
});


window.onload = function () {
var replyLinks = document.querySelectorAll(".comment-reply-link");
for (var i = 0; i < replyLinks.length; i++) {
replyLinks[i].onclick = function () {
var pk = this.getAttribute("data-pk");
do_reply(pk);
};
}
};

// $(document).ready(function () {
// var form = $('#i18n-form');
// var selector = $('.i18n-select');
Expand Down
3 changes: 1 addition & 2 deletions templates/comments/tags/comment_item_tree.html
Expand Up @@ -35,8 +35,7 @@
<p>{{ comment_item.body|escape|comment_markdown }}</p>

<div class="reply"><a rel="nofollow" class="comment-reply-link"
href="javascript:void(0)"
onclick="do_reply({{ comment_item.pk }})"
href="javascript:void(0)" data-pk="{{ comment_item.pk }}"
aria-label="回复给{{ comment_item.author.username }}">回复</a></div>
</div>

Expand Down

0 comments on commit 10ed972

Please sign in to comment.