Skip to content

Commit

Permalink
fix: Bug resolved with date appearing multiple times (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 authored Jun 13, 2022
1 parent 3656e74 commit 7592338
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ The following are known limitations that cannot be fixed:

## Changelog

### Changes in 3.9.3

- Fix bug where the submission edited time appears more than once.

### Changes in 3.9.2

- Fixed edited submissions when not using Reddit Enhancement Suite (RES is not a requirement).
Expand Down
2 changes: 1 addition & 1 deletion manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Unedit and Undelete for Reddit",
"description": "Creates links next to edited and deleted Reddit posts to show the original from before it was edited/removed.",
"version": "3.9.2",
"version": "3.9.3",
"content_scripts": [
{
"run_at": "document_idle",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Unedit and Undelete for Reddit",
"description": "Creates links next to edited and deleted Reddit posts to show the original from before it was edited/removed.",
"version": "3.9.2",
"version": "3.9.3",
"content_scripts": [
{
"run_at": "document_idle",
Expand Down
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Unedit and Undelete for Reddit
// @namespace http://tampermonkey.net/
// @version 3.9.2
// @version 3.9.3
// @description Creates the option next to edited and deleted Reddit comments/posts to show the original comment from before it was edited
// @author Jonah Lawrence (DenverCoder1)
// @match *://*reddit.com/*
Expand Down Expand Up @@ -474,7 +474,7 @@
const postId = submission.id;
const editedAt = submission.edited;
selectors = [
`#t3_${postId} > div:first-of-type > div:nth-of-type(2) > div:first-of-type > div:first-of-type > span:last-of-type:not(.found)`, // Submission page
`#t3_${postId} > div:first-of-type > div:nth-of-type(2) > div:first-of-type > div:first-of-type > span:first-of-type:not(.found)`, // Submission page
`#t3_${postId} > div:last-of-type[data-click-id] > div:first-of-type > div:first-of-type > div:first-of-type:not(.found)`, // Subreddit listing view
`.Post.t3_${postId} > div:last-of-type[data-click-id] > div:first-of-type > div:nth-of-type(2) > div:first-of-type:not(.found)`, // Profile/home listing view
`.Post.t3_${postId}:not(.scrollerItem) > div:first-of-type > div:nth-of-type(2) > div:nth-of-type(2) > div:first-of-type > div:first-of-type:not(.found)`, // Preview popup
Expand Down

0 comments on commit 7592338

Please sign in to comment.