commento.js: remove event listeners before adding new ones

This commit is contained in:
Adhityaa Chandrasekar 2019-04-13 21:11:00 -04:00
parent 9607c15c2b
commit be10baf971

View File

@ -995,6 +995,7 @@
replyButton.title = "Cancel reply"; replyButton.title = "Cancel reply";
replyButton = removeAllEventListeners(replyButton);
onclick(replyButton, global.replyCollapse, id); onclick(replyButton, global.replyCollapse, id);
}; };
@ -1011,6 +1012,7 @@
replyButton.title = "Reply to this comment"; replyButton.title = "Reply to this comment";
replyButton = removeAllEventListeners(replyButton);
onclick(replyButton, global.replyShow, id) onclick(replyButton, global.replyShow, id)
} }
@ -1028,6 +1030,7 @@
button.title = "Expand children"; button.title = "Expand children";
button = removeAllEventListeners(button);
onclick(button, global.commentUncollapse, id); onclick(button, global.commentUncollapse, id);
} }
@ -1045,6 +1048,7 @@
button.title = "Collapse children"; button.title = "Collapse children";
button = removeAllEventListeners(button);
onclick(button, global.commentCollapse, id); onclick(button, global.commentCollapse, id);
} }