Commit graph

277 commits

Author SHA1 Message Date
Christopher Gurnee
b7c868b127 Add dialog to notify of Reddit's ban of Pushshift 2023-05-01 23:37:42 +00:00
Christopher Gurnee
75ca826171 Add support for Waterfox Classic, fixes #11 2023-05-01 12:20:34 +00:00
Christopher Gurnee
f47063bbcc Fix thumbnails containing & 2023-04-25 14:53:15 +00:00
Christopher Gurnee
48f4fada9f Update dependencies 2023-04-25 14:32:28 +00:00
Christopher Gurnee
1941879ad5 Add missing spoiler thumbnail 2022-12-18 16:18:38 +00:00
Christopher Gurnee
cb316a541e Initial updates for the new Pushshift API
This should make things mostly work with the new API, however there's
a lot more to do plus the API is (probably) still in flux.
2022-12-13 22:43:05 +00:00
Christopher Gurnee
d45daec442 Update dependencies 2022-12-13 22:42:13 +00:00
Christopher Gurnee
25063ac8e3 Ensure all Pushshift comment reqs include q=*
Pushshift requests w/o `q=*` have been broken for about 2 weeks now.
Once they are working, this change will be reverted.
2022-11-28 17:18:16 +00:00
Christopher Gurnee
bd6812d92d Small performance improvement 2022-11-28 17:02:13 +00:00
Christopher Gurnee
1d97cf17ed Update dependencies 2022-11-28 17:02:02 +00:00
Christopher Gurnee
cb7302c7ff Fix regression introduced in 9134f3f 2022-11-10 23:04:52 +00:00
Christopher Gurnee
9134f3f569 Fix bug where rich diff wasn't display by default
Instead, the original was displayed even when the edit was available.
This bug was introduced:

 * in 7c935ab for all edited posts, and
 * when rich diffs where first added, but only in cases where a perent
   comment was edited, and that parent was loaded by clicking `parent`
   from a top-level permalinked comment.
2022-11-07 18:41:08 +00:00
Christopher Gurnee
1b874bef66 Update dependencies 2022-11-07 18:39:49 +00:00
Christopher Gurnee
c83f139ff8 Halve Pushshift requests to 30/min. to avoid 429s 2022-10-26 15:44:33 +00:00
Christopher Gurnee
7c935ab666 Add eslint-plugin-react-hooks and fix a related bug
To reproduce the bug with the older code, visit
  https://www.unddit.com/r/space/comments/y8ul7n/_/it2cz6o/
and then click the Parent link on the top-most comment. Installing
eslint-plugin-react-hooks hopefully prevents future related bugs.
2022-10-20 23:24:19 +00:00
Christopher Gurnee
529162bec0 Switch from JS Standard Style to plain ESLint
The codebase hasn't been checked against Standard in ages, so remove it
and configure plain ESLint and eslint-plugin-react instead. Also fix a
few small bugs discovered by ESLint and plugin-react.
2022-10-20 23:21:56 +00:00
Christopher Gurnee
763516b19d Update dependencies 2022-10-20 16:25:30 +00:00
Christopher Gurnee
af18d3a868 Improve Reddit OAuth token retrieval
* Only make one OAuth attempt at a time (no async OAuth requests)
 * Respect token expiration
2022-10-10 17:59:47 +00:00
Christopher Gurnee
be7064124f Respect Reddit API limits
With Pushshift's increase in the maximum request size from 100 to 250
comments, this also increases the Reddit request rate by 2.5x. This
makes it possible to overrun the API limits, so start tracking and
respecting them. Also switch back to logging into Reddit to increase
these limits.
2022-10-10 17:05:48 +00:00
Christopher Gurnee
ec0fc925b4 Increase PushShift comments retrieved size to 250 2022-10-10 17:02:35 +00:00
Christopher Gurnee
75e1de010c Update dependencies 2022-10-10 17:01:16 +00:00
Christopher Gurnee
5b0adb2a1d Update the Is-Pushsift-down link 2022-08-01 16:25:45 +00:00
Christopher Gurnee
6bd725796e Update dependencies 2022-08-01 16:21:51 +00:00
Christopher Gurnee
5b5295c30d Update dependencies 2022-07-20 18:31:13 +00:00
Christopher Gurnee
d6c0fc65d3 Color comments '[ Removed by Reddit ]' as removed 2022-06-13 16:25:48 +00:00
Christopher Gurnee
c47103b28a Update dependencies 2022-06-13 16:25:42 +00:00
Christopher Gurnee
064f319db9 Add and make default a highlighted mode for edits 2022-05-30 17:37:49 +00:00
Christopher Gurnee
2a29851ed7 Update dependencies 2022-05-30 17:23:32 +00:00
Christopher Gurnee
981c06fb73 Fix some minor context-related edge cases 2022-05-22 14:46:04 +00:00
Christopher Gurnee
ccfb452bce Prevent extraneous requests to the Reddit API
Unnecessary requests for already-retrieved comments were sometimes being
sent to the Reddit API when retrieving context or loading permalinks.
2022-05-16 22:39:43 +00:00
Christopher Gurnee
d35f7e7bf0 Fix some minor (mostly display) context bugs 2022-05-16 20:53:14 +00:00
Christopher Gurnee
07d4863c7a Add support for Reddit-style bookmarks/hashes 2022-05-16 14:16:18 +00:00
Christopher Gurnee
85af5be925 Add context query param: shows permalink ancestors
Appending `?context=#` to a permalink will highlight the permalinked
comment and display above it up to 8 ancestors, similar to Reddit's
behaviour. To keep things fast, this update required that the Pushshift
comments endpoint work with `ids` queries which was fixed around May 11.
2022-05-13 22:33:18 +00:00
Christopher Gurnee
32deb7f1e6 Update dependencies 2022-05-13 22:04:31 +00:00
Christopher Gurnee
7cc5521c83 Fix minor bug in error-handling 2022-05-13 16:16:37 +00:00
Christopher Gurnee
d3fbd86dd3 Rename redditIdsToPushshift() to fullnamesToShortIDs() 2022-05-13 16:13:43 +00:00
Christopher Gurnee
08991dfbb0 Work around Pushshift bug for certain time ranges
Comments in the time ranges below need a workaround which slows down
Pushshift queries, but it's required to retrieve them correctly

 * Sep/1/2017 0:00 - Sep/30/2017 23:59:59 UTC
 * Feb/1/2018 0:00 - Mar/31/2018 23:59:59 UTC
2022-05-09 20:07:12 +00:00
Christopher Gurnee
0ca5630ffe Refactor counting of removed/deleted comments
This fixes a small bug, and avoids unnecessary setState() calls.
2022-04-29 17:05:15 +00:00
Christopher Gurnee
44b3049406 Fix under-post links when Reddit is broken 2022-04-21 22:42:17 +00:00
Christopher Gurnee
6d687e188c Fix default of scrolling past the post w/permalinks
Regression from 536bccb
2022-04-21 22:14:52 +00:00
Christopher Gurnee
b8411d84b3 Fix permalinked comments missing from Pushshift
There were two bugs when a permalinked comment was missing from
Pushshift, but available via Reddit:

 * the links below the comment (`permalink reddit reveddit`) were
   often broken due to calling `redditIdsToPushshift()` twice
 * if removed or deleted, it wasn't counted or colored correctly
2022-04-20 15:08:27 +00:00
Christopher Gurnee
54bd0d9bce Update dependencies 2022-04-20 13:33:56 +00:00
Christopher Gurnee
2449a88f01 Add tooltips on click for touch/pen screens
Credit to SO contributer 'H K': https://stackoverflow.com/a/60660207
2022-04-17 03:18:23 +00:00
Christopher Gurnee
5d09ea54ab Do fetch deleted link-posts from Pushshift
There's still some data that Pushshift can restore from these link-posts
2022-04-16 15:17:02 +00:00
Christopher Gurnee
536bccba2a Fix visits to full posts but with a bookmark/hash
Beforehand, only initial visits to single comments (permalinks)
and internal links correctly scrolled to the bookmark/hash.
2022-04-15 00:18:49 +00:00
Christopher Gurnee
1e21ba474a Fix some small post display/link issues
* make the post placeholder bigger to minimize the layout changes
   as the post loads
 * correctly add link clicks to the location history if the current
   location differs from the link target
2022-04-14 23:53:36 +00:00
Christopher Gurnee
df0c86aac0 Don't fetch removed link-posts from Pushshift
Removed/deleted self-posts are still fetched from Pushshift to get
the selftext, however there's no value in fetching link-posts.

Also:

 * Don't display '[deleted]' if no selftext was deleted.
 * Add key attributes to the post <div> so that React recreates
   it instead of mutating it after the Post loads. This prevents
   transitioning the background color (from the dark/light mode css).
2022-04-14 22:25:17 +00:00
Christopher Gurnee
37e0a152e1 Update dependencies 2022-04-14 21:04:54 +00:00
Christopher Gurnee
8ed7e8c644 Fix incorrectly named 'class' JSX attribute 2022-04-11 19:27:18 +00:00
Christopher Gurnee
8d80eacf41 Don't add link-to-self clicks to location history 2022-04-11 16:34:49 +00:00