openvk/Web/static/js/al_comments.js

10 lines
362 B
JavaScript
Raw Permalink Normal View History

u(".comment-reply").on("click", function(e) {
let inputbox = u("#write textarea");
let comment = u(e.target).closest(".post");
let authorId = comment.data("owner-id");
let authorNm = u(".post-author > a > b", comment.first()).text().trim();
inputbox.text("[id" + authorId + "|" + authorNm + "], ");
inputbox.trigger("focusin");
});