Skip to content

Commit

Permalink
fix: Hide link in classic view since it does not display well (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 authored Aug 8, 2022
1 parent 86bd61d commit f41cae6
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.12.1

- Hide link on edited submissions in Classic View since it does not display well (Reddit Redesign)

### Changes in 3.12.0

- Added support to show the author of posts that were not edited but the author no longer exists
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": "Show original comments and posts from before they were edited or removed",
"version": "3.12.0",
"version": "3.12.1",
"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": "Show original comments and posts from before they were edited or removed",
"version": "3.12.0",
"version": "3.12.1",
"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.12.0
// @version 3.12.1
// @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 https://reddit.com/*
Expand Down Expand Up @@ -558,7 +558,7 @@
`#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:first-of-type > div:nth-of-type(2) > div:first-of-type > div:first-of-type > div:first-of-type > div:first-of-type > span:first-of-type:not(.found)`, // Comment context 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} > div:last-of-type[data-click-id] > div:first-of-type > div:nth-of-type(2) > div:first-of-type:not([data-adclicklocation="title"]):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
];
Array.from(document.querySelectorAll(selectors.join(", "))).forEach((el) => {
Expand Down

0 comments on commit f41cae6

Please sign in to comment.