Add TopCommentSort.os.js: sort Reddit post comments by Top by default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 20:23:54 -07:00
co-authored by Claude Opus 5.5
parent b20ad95a0d
commit 5afc10dfcd
2 changed files with 80 additions and 0 deletions
+19
View File
@@ -23,3 +23,22 @@ Embeds relevant Reddit discussion threads and comments directly above the native
3. Copy and paste the contents of [`YouTube.os.js`](YouTube.os.js) into the editor.
4. Save the script and ensure it is enabled.
5. Open any YouTube video with Reddit discussions (e.g. trailers, music videos, podcasts).
### 2. Top Comment Sort (`TopCommentSort.os.js`)
Opens every Reddit post with its comments sorted by **Top** instead of Best or a subreddit's suggested sort.
#### Features
- **Top by Default:** Any post opened without an explicit sort loads with `?sort=top`, including links from feeds, search, profiles, and comment threads.
- **No Double Loads:** Post links are pointed at the sorted URL before they are followed, so Reddit's in-page navigation loads Top directly instead of loading twice.
- **Direct Visits Too:** Posts opened from the address bar, a new tab, or an external site are switched to Top before the page renders.
- **Your Choice Wins:** Picking another sort from the post's sort menu (including Best) is respected and never overridden.
- **Explicit Links Respected:** Links that already carry a sort, such as `?sort=new`, are left alone.
- **Selector Free:** Works through URLs and the browser Navigation API rather than Reddit's markup, so redesigns are unlikely to break it.
#### Installation
1. Install [OpenScript](https://chromewebstore.google.com/detail/openscript/dkelmgdchndagjemmodhkphdikhpnfol).
2. Open the OpenScript popup and click **New Script**.
3. Copy and paste the contents of [`TopCommentSort.os.js`](TopCommentSort.os.js) into the editor.
4. Save the script and ensure it is enabled.
5. Open any post on [reddit.com](https://www.reddit.com).