From be10baf971fec3aafbb189aeb14cc278c4d7e67c Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Sat, 13 Apr 2019 21:11:00 -0400 Subject: [PATCH] commento.js: remove event listeners before adding new ones --- frontend/js/commento.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index 0f271b0..1749dec 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -995,6 +995,7 @@ replyButton.title = "Cancel reply"; + replyButton = removeAllEventListeners(replyButton); onclick(replyButton, global.replyCollapse, id); }; @@ -1011,6 +1012,7 @@ replyButton.title = "Reply to this comment"; + replyButton = removeAllEventListeners(replyButton); onclick(replyButton, global.replyShow, id) } @@ -1028,6 +1030,7 @@ button.title = "Expand children"; + button = removeAllEventListeners(button); onclick(button, global.commentUncollapse, id); } @@ -1045,6 +1048,7 @@ button.title = "Collapse children"; + button = removeAllEventListeners(button); onclick(button, global.commentCollapse, id); }