mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Small bug fix
This commit is contained in:
parent
a3e67d9557
commit
9783a44701
2 changed files with 7 additions and 5 deletions
|
|
@ -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 !== '' ? '<div id="thread-selftext" class="user-text">'+markdown.render(thread.selftext)+'</div>':''}
|
||||
<div id="total-comments"><b>${totalComments} comments</b></div>
|
||||
${thread.media !== null ? parseHTML(thread.media_embed.content) : ''}
|
||||
${imageHosts.includes(thread.domain) ? '<a href="'+thread.url+'"><img id="thread-image" src="'+thread.preview.images[0].source.url+'"></a>' : ''}
|
||||
${imageHosts.includes(thread.domain) && thread.hasOwnProperty("preview") ? '<a href="'+thread.url+'"><img id="thread-image" src="'+thread.preview.images[0].source.url+'"></a>' : ''}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<p>
|
||||
<b>How to use</b>: go to any Reddit thread and replace the <i>reddit</i> in the URL with <i>removeddit</i>
|
||||
<br>E.g.
|
||||
<a href="/r/TwoXChromosomes/comments/6z1hch/malala_says_oxford_was_the_hardest_interview_of/">
|
||||
https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/malala_says_oxford_was_the_hardest_interview_of/
|
||||
<a href="/r/TwoXChromosomes/comments/6z1hch/">
|
||||
https://www.removeddit.com/r/TwoXChromosomes/comments/6z1hch/
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue