Skip to content

Commit 650c955

Browse files
authored
feat: deleted comments on old reddit, bump version
1 parent d040e26 commit 650c955

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Alternatively, you may copy the contents of `script.js` into a new script using
2525

2626
----
2727

28+
### Changes in 3.7
29+
30+
* Added support for viewing comments removed by moderators
31+
2832
### Changes in 3.6
2933

3034
* Check an second source for comments so more recent comments are less likely to be "not found"

script.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name Unedit and Undelete for Reddit
33
// @namespace http://tampermonkey.net/
4-
// @version 3.6.1
4+
// @version 3.7.0
55
// @description Creates the option next to edited and deleted Reddit comments/posts to show the original comment from before it was edited
66
// @author u/DenverCoder1
77
// @match *://*reddit.com/*
@@ -274,11 +274,17 @@
274274
})
275275
);
276276
} else {
277-
/* Old Reddit */
277+
/* Old Reddit */
278278
/* edited comments and submissions */
279279
editedComments = Array.from(document.querySelectorAll("time")).filter(function (x, y, z) {
280280
return Array.from(x.classList).indexOf("found") < 0 && x.title.substr(0, 11) == "last edited";
281281
});
282+
/* removed comments */
283+
editedComments = editedComments.concat(
284+
Array.from(document.querySelectorAll("em")).filter(function (x, y, z) {
285+
return Array.from(x.classList).indexOf("found") < 0 && x.innerText === "[deleted]";
286+
})
287+
);
282288
}
283289
/* create links */
284290
editedComments.forEach(function (x, y, z) {

0 commit comments

Comments
 (0)