Chrome/Firefox extension for easier tracking of new comments on Reddit. Free, open source, privacy aware.
MIT License
Have you ever had to reread entire 200+ comments Reddit thread just to find a few new comments? Every day, few times a day?
Chrome/Firefox extension for easier tracking of new comments on Reddit. Free, open source, privacy aware, runs completely client side without sending any data to any server.
Around January 2024. Reddit moved all users to the new design and made version v0.0.4
outdated. In April 2024. I updated the extension to 1.1.1
to support the new design, and that is the only Reddit design that is supported (available on www.reddit.com
).
The screenshot bellow shows the new design, demo video shows deprecated design - all features are the same, it shouldn't be a problem.
Version 1.1.1
also includes Immediately
checkbox to mark the current thread as read manually.
Ctrl + Space
. Scroll to the first highlighted comment with Ctrl + Shift + Space
. Can pick weather to scroll to 1. Unread highlighted comment, 2. Highlighted comment by timestamp, or 3. Both. Scrolling to the next page of not visible comments is more efficient compared to just scrolling to the next comment.source/reddit-comments/constants.ts
making it easier to update and maintain when Reddit modifies design and markup in the future.Firefox store link: https://addons.mozilla.org/en-US/firefox/addon/reddit-unread-comments
Chrome store link: https://chromewebstore.google.com/detail/reddit-unread-comments/bbpcddepjkegcdfnddhagpdjhmhnegcc
Go to release page https://github.com/nemanjam/reddit-unread-comments/releases/tag/1.1.1 and download Firefox .xpi
or Chrome .zip
.
Firefox manual install:
In Firefox click Settings
(three horizontal lines in the top-right corner), click Extensions tab
, click Gear
icon right from Manage Your Extensions
, choose Install Add-on From File...
from the menu and browse reddit-unread-comments-1.1.1-firefox.xpi
file which you can download from the release page.
Firefox .xpi
: reddit-unread-comments-1.1.1-firefox.xpi
Chrome manual install:
In Chrome navigate to chrome://extensions/
, switch Enable developer mode
to true, click Load unpacked
and browse reddit-unread-comments-1.1.1-chrome.zip
file which you can download from the release page.
Chrome .zip
: reddit-unread-comments-1.1.1-chrome.zip
www.reddit.com
, it won't work on old website old.reddit.com
and new website new.reddit.com
.Reddit uses Best
(mostly), Top
, New
, Controversial
, Old
and Q&A
for primary sorting orders for comments in threads. Secondary sorting order (comments of a comment) are always chronological - New
.
So what is wrong with this and why this needs fixing?
Sorting by Best
(default in most subreddits) breaks chronological order of the comments and you can't always understand context if some comment is a reaction to some previous comment and also makes it impossible to track what are the new comments since your last visit. Because you usually check same thread few times if that is topic of your interest. This gets worse if thread has hundreds of comments when you have to reread entire thread just to spot few new comments which is waste of time and nerves. All of this is probably something that you are already familiar with.
Just simplify things, make them intuitive and sort everything chronologically by new, mark unread comments since last visit with red highlight for threads that I closely follow and read multiple times, and add independent secondary yellow highlight based on comment's timestamp where I can quickly filter new comments for threads that I visit for the first time or follow less closely. When you move the slider highlight and Count are reflected immediately. Use Ctrl + Space
and Ctrl + Shift + Space
shortcuts to scroll quickly to the next unread page (or new) of comments and to the first unread comment respectively. Optionally force default sorting to New
for all subreddits. Use reset thread and reset threads options if you want to start from scratch. That's it.
If you are an user you can find the features overview here: users-note.md.
If you are a developer and want to contribute or understand codebase faster you can find the code overview and implementation details explained here: developers-note.md. Additionally there are more unsorted working notes in this folder: /docs/work-notes.
NODE_OPTIONS=--openssl-legacy-provider
option which is already included in the package.json
scripts. Install dependencies with:yarn install
# Firefox
yarn dev:firefox
# Chrome
yarn dev:chrome
about:debugging#/runtime/this-firefox
and load the manifest file from extension/firefox/manifest.json
. Popup will load only in Reddit threads. See the screenshot bellow:chrome://extensions/
, enable Developer mode
switch and select the entire Chrome extension folder extension/chrome
.When debugging the Popup code in Firefox you will need to open developer console with Ctrl + Shift + j
and to use console.error
instead of console.log
. There is a logger instance in source/reddit-comments/logger.ts
that you can use for logging and debugging in code other than Popup.
To view logs in Chrome you need to enable developer mode and click background page
link for this extension, see this Stackoverflow answer
To build binaries run the following commands:
# Firefox - outputs: extensions/firefox.xpi
yarn build:firefox
# Chrome - outputs: extensions/chrome.zip
yarn build:chrome
When building the extension for publishing to stores for Chrome you must use v3
manifest from source/manifest-v3-chrome.json
and for Firefox v2
manifest from source/manifest-v2-firefox.json
. Just copy the content from the file you need into source/manifest.json
and build the archive you need.
-- implemented in IndexedDB
-- https://dbdiagram.io syntax
Table Thread {
id integer [primary key, note: 'autoincrement']
threadId varchar [unique]
updatedAt timestamp
latestCommentId varchar
latestCommentTimestamp timestamp
}
Table Comment {
id integer [primary key, note: 'autoincrement']
commentId varchar [unique]
threadId varchar
sessionCreatedAt timestamp [note: '2e2 | now()']
}
Table Settings {
id integer [primary key, default: 1, note: 'singleton']
isHighlightOnTime boolean
timeSlider varchar
timeScale varchar
isHighlightUnread boolean
unHighlightOn varchar
scrollTo varchar
sortAllByNew boolean
enableLogger boolean
}
Ref: Thread.threadId < Comment.threadId -- Thread:Comment 1:N
Before any work please have a look at Documentation, and then open an issue in this repo to discuss with me about a feature you want to add. Some of the possible future tasks are:
onScroll
in thread overlay fires before onUrlChange
with less delay for DOM to load, causing overlay not to be detected and comment timestampId
not to be found, exception is handled but still try to fix. The issue is documented here: onScroll event fires before onUrlChange #1
useReducer
with onChange
to handle Popup form fields instead of the existing react-hook-form
(maybe). Because it's just state management without any validation logic.isElementInViewport()
can be improved for the comments higher than viewport (maybe).source/reddit-comments/exceptions.ts
.redditThreadUrlRegex
in source/reddit-comments/constants.ts
more tight (maybe).Ctrl + Space
scroll slikts/unreaddit
https://www.linkedin.com/in/nemanja-mitic
December 2023.
This project uses MIT license: License