Export, import, and bulk-manage your Reddit subreddit subscriptions from a floating panel.
A browser userscript for bulk-managing your Reddit account: export and import subreddits, leave subscriptions, overwrite & delete visible posts and comments, or navigate to official account deletion.
Everything runs from a floating Shadow DOM readout in the bottom-right of any reddit.com page — featuring a 3-cell live dashboard (Subreddits, Posts, Comments) and live Pause / Cancel controls.
Grab dist/reddit-manager.user.js and install it in Tampermonkey / Violentmonkey.
bun install
bun run build # → dist/reddit-manager.user.js
| Action | What it does |
|---|---|
| Export | Downloads reddit-subreddits-YYYY-MM-DD.json — name, id, title, subscriber count and NSFW flag per sub. |
| Import | Pick a file, confirm the count, and it joins them all. Merges — subreddits you already have are skipped, none are removed. |
| Refresh | Re-reads your subscription list and on-demand stats from Reddit. |
| Leave all | Unsubscribes from everything. Type the subreddit count to unlock; a backup file downloads first. |
| Delete visible posts | Overwrites post body with . before deleting from Reddit (up to Reddit's 1,000 item visible history limit). Requires typed count confirmation. |
| Delete visible comments | Overwrites comment text with . before deleting from Reddit (up to Reddit's 1,000 item visible history limit). Requires typed count confirmation. |
| Open account deletion page | Navigates safely to Reddit's official account deletion page (old.reddit.com/prefs/delete/) for password confirmation. |
While a bulk run is active, a control bar with Pause / Resume and Cancel appears:
The parser accepts:
{"subreddits": [{"name": "pics"}, …]})display_name)r/pics, /r/pics/, or full URLsNames are normalized and deduped case-insensitively before anything is sent.
src/api.ts (API Client): Handles all direct HTTP communication with Reddit.
meInfo() using in-flight promise tracking to prevent duplicate auth calls. Only valid successful authentication responses are cached.fetchWithRetry retries 429/500/502/503/504 and thrown network TypeErrors with exponential backoff + jitter, parsing numeric and HTTP-Date Retry-After / x-ratelimit-reset headers with a live second-by-second countdown timer.deleteUserItem() validates /api/editusertext HTTP responses and Reddit API error arrays. If an overwrite fails, an explicit error is thrown instead of deleting the item while claiming it was edited.location.origin, so it works on www., old. and sh. without cross-origin calls.src/portability.ts (Core Operations): Drives all bulk actions and progress tracking.
Promise.allSettled): Fetches counts independently using Promise.allSettled() so failed endpoints display — instead of faking zero counts.SUB_PAUSE_MS (650ms, ~92 req/min) for subscriptions and DELETE_PAUSE_MS (1300ms, ~92 req/min across 2-request overwrite+del ops) to strictly respect Reddit's 100 req/min limit; bails out after 3 consecutive failures (GIVE_UP_AFTER) to avoid grinding through broken auth.Stopped — X left untouched.) when cancelled early.src/panel.ts (UI & Shadow DOM):
ShadowRoot so page stylesheets can't leak into the panel.overflow-y: auto with max-height for small mobile viewports. Sets visibility: hidden and aria-hidden="true" when closed to trap keyboard focus safely..textContent instead of direct innerHTML string interpolation sinks.src/index.ts (Entry Point): Mounts the UI. No @grant, no GM APIs.bun run test # vitest run (26 unit tests)
bun run tsc # typescript check
bun run lint # biome check
bun run build # vite build → dist/reddit-manager.user.js