Made the deletion/removal detection more robust in case Reddit would change it again

This commit is contained in:
JubbeArt 2018-08-08 12:05:50 +02:00
parent a8614410e0
commit 6cbbb528d6
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "removeddit",
"version": "1.1.1",
"version": "1.1.2",
"description": "View removed comments from reddit",
"main": "src/index.js",
"repository": {

View file

@ -21,11 +21,11 @@ export const chunk = (arr, size) => {
export const toBase36 = number => parseInt(number, 10).toString(36)
export const toBase10 = numberString => parseInt(numberString, 36)
// Reddits way of indicating that something is deleted
export const isDeleted = textBody => textBody === '\\[deleted\\]'
// Reddits way of indicating that something is deleted (the '\\' is for Reddit and the other is for pushshift)
export const isDeleted = textBody => textBody === '\\[deleted\\]' || textBody === '[deleted]'
// Reddits way of indicating that something is deleted
export const isRemoved = textBody => textBody === '\\[removed\\]'
export const isRemoved = textBody => textBody === '\\[removed\\]' || textBody === '[removed]'
// Default thumbnails for reddit threads
export const redditThumbnails = ['self', 'default', 'image', 'nsfw']