mirror of
https://github.com/GetOpenScript/Reddit.openscript.git
synced 2026-10-29 00:24:50 +00:00
5afc10dfcdf8fc5407a47651233aba7a6003c1eb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reddit.openscript
User scripts for Reddit integrations powered by OpenScript.
Scripts
1. Reddit Comments on YouTube (YouTube.os.js)
Embeds relevant Reddit discussion threads and comments directly above the native YouTube comment section on any YouTube video page.
Features
- Zero API Keys & Read-Only: Queries public Reddit JSON endpoints without credentials or cookies. Completely anonymous.
- Dual Comment Display: YouTube comments remain visible and accessible directly beneath the Reddit discussion section.
- Multiple Threads Support: Displays clickable subreddit tabs sorted by
topscore. - Official Subreddit Detection: Automatically detects subreddit links in video descriptions and badges matching threads as
Official. - Collapsible Comment Trees: Clean nested thread view with
[–]and[+]collapse toggles. - Native YouTube Theming: Adapts seamlessly to YouTube's light and dark themes using YouTube CSS color variables.
- Always Fresh: No caching, so newly submitted threads appear on page navigation.
Installation
- Install OpenScript (requires version
1.0.4or newer forOpenScript.fetch). - Open the OpenScript popup and click New Script.
- Copy and paste the contents of
YouTube.os.jsinto the editor. - Save the script and ensure it is enabled.
- 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
- Install OpenScript.
- Open the OpenScript popup and click New Script.
- Copy and paste the contents of
TopCommentSort.os.jsinto the editor. - Save the script and ensure it is enabled.
- Open any post on reddit.com.
Languages
JavaScript
100%