Skip to content

Commit d040e26

Browse files
feat: Added the functionality to view comments deleted by moderator (#4)
1 parent 347a4b4 commit d040e26

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

script.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
editedComments = Array.from(document.querySelectorAll(".Comment div span")).filter(function (x, y, z) {
256256
return x.parentElement.querySelector("a.showOriginal") === null && x.innerText.substr(0, 6) == "edited";
257257
});
258-
/* include deleted comments */
258+
/* include deleted comments by user */
259259
editedComments = editedComments.concat(
260260
Array.from(document.querySelectorAll(".Comment div span")).filter(function (x, y, z) {
261261
return (
@@ -264,6 +264,15 @@
264264
);
265265
})
266266
);
267+
/* include deleted comments by moderator */
268+
editedComments = editedComments.concat(
269+
Array.from(document.querySelectorAll(".Comment div span")).filter(function (x, y, z) {
270+
return (
271+
x.parentElement.querySelector("a.showOriginal") === null &&
272+
x.innerText.substr(0, 15) == "Comment removed"
273+
);
274+
})
275+
);
267276
} else {
268277
/* Old Reddit */
269278
/* edited comments and submissions */

0 commit comments

Comments
 (0)