I have some code to run blogger comment form, I gave yrfr id to a button , with this the comment form is loading.
I have a reply button with class reply-to but it doesn't work without clicking the button with yrfr id.
How can I make the comment form work when I press the reply button?
document.getElementById("yrfr").addEventListener("click", function() {
var a = document,
b = a.getElementById("comment-editor"),
d = b.getAttribute("data-src");
if (b.setAttribute("src", d), 1 == comment) {
var f = a.getElementsByClassName("reply-to"),
c = a.getElementById("threaded-comment-form"),
h = f.length,
k = function(b, d, e, f) {
b.addEventListener("click", function() {
var c = b.getAttribute("data-reply-to");
a.getElementById("c" + c).appendChild(d);
e.src = f + "&parentID=" + c
})
};
for (i = 0; i < h; i++) k(f[i], c, b, d);
var l = a.getElementsByClassName("comment-form")[0];
a.getElementById("yrfr").addEventListener("click", function() {
l.appendChild(c);
b.src = d
})
}
});