In firefox, if the bookmarklet returns something, the page contents will be replaced by it. In this case, the bookmarklet returns a Window object, replacing the original contents with "[object Window]".
Source: https://stackoverflow.com/questions/2774453
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.
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.
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.
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.
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.
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
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
* 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
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).
Visiting a permalink (from an internal or external link) now scrolls to
just past the post, and both parent and permalinks scroll smoothly where
appropriate; it makes sense for internal permalinks to immediately jump.
* Only redirect Reddit post links to Unddit if it's likely to work.
* Use React <Link>s instead of <a>s if the post link matches the
post itself. This avoids an unnecessary page reload if clicked.
* Relative links in comments still don't work well...
Beforehand, visiting a permalink would cause Unddit to begin loading
from the Post's first comment. If the max-to-download setting was too
small, and the permalinked comment wasn't yet encountered, no comment
tree would be displayed.
Now, only comments that occur at the same time as the permalinked
comment or later (chronologically) are downloaded.
This also adds a Parent link to each comment. When viewing a permalinked
comment, clicking the top-level Parent link will download only new
comments between the parent and child comments. Likewise, clicking the
'view rest of comments' link will only download new comments from the
first comment up until the previously viewed comment.
In general, Unddit will not re-download comments that it knows it has
previously downloaded, nor download more than max-to-download comments
per link clicked. This can leave 'gaps' in the list of downloaded
comments. If the 'load more comments' link is clicked, Unddit will only
download comments that can fill such gaps between the currently-linked
permalink (or if not viewing one, the first comment) and the last, up to
the max-to-download setting.