diff --git a/static/script.js b/static/script.js index 67456d8..66f10de 100644 --- a/static/script.js +++ b/static/script.js @@ -140,16 +140,18 @@ function extractMorechildrenIDs(comments) { async function getRemovedComments(allCommentIDs) { - const idsDiff = allCommentIDs.filter(x => !commentIDs.includes(x)) + let idsDiff = allCommentIDs.filter(x => !commentIDs.includes(x)) commentIDs.forEach(id => { if(commentLookup.has(id)) { - if(commentLookup.get(id).body === "[removed]") { + if(commentLookup.get(id).body === "[removed]" || commentLookup.get(id).body === "[deleted]") { idsDiff.push(id) } } }) + idsDiff = [...new Set(idsDiff)] + generateCommentInfo(idsDiff.length) console.log("All ids :", allCommentIDs) console.log("Comments ids (dup): ", commentIDs) @@ -279,7 +281,7 @@ function generateThread(data) { ${thread.selftext !== '' ? '
How to use: go to any Reddit thread and replace the reddit in the URL with removeddit
E.g.
-
- https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/malala_says_oxford_was_the_hardest_interview_of/
+
+ https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/