Small scripts. Better tabs. More control.
A collection of browser-chrome customizations for Firefox and Zen Browser — from tab highlighting to YouTube tools and memory management.
🚀 Install · 🎨 Appearance · 🧠 Memory ·
Note
Everything below is collapsed by default. Click a section's arrow to read it. Install only the scripts you want.
| Category | Script | Description |
|---|---|---|
| 🎨 Appearance | Tab Highlight Plus | Color tabs, Zen folders, and their contents. |
| 🖱️ Tabs | Double Click Duplicate Tab | Double-click a tab to duplicate it. |
| 🧠 Memory | Extreme Memory Controller | Manage inactive tabs and request memory cleanup. |
| 🧹 Memory | Periodic Memory Cleaner | Request memory cleanup at a fixed interval. |
| 🌈 YouTube | YTColors26 | Color video cards by upload age. |
| YTPlaybackFixer | Attempt playback recovery and preferred-quality selection. |
- Firefox or Zen Browser with a working browser-chrome script loader, such as fx-autoconfig.
- Access to your browser profile:
about:support→ Profile Folder → Open Folder.
- Install and configure your
userChrome.jsloader following its documentation. - Copy the desired files from
chrome/JSinto the matching folder in your profile. Keep required subfolders. - Remove older copies of the same script to avoid duplicates.
- In
about:support, select Clear startup cache (if available), then fully restart your browser.
<profile>/
└── chrome/
└── JS/
├── dblclickDuplicateTab.uc.js
├── highlightTab.uc.js
├── extreme-memory-controller.uc.js
├── Periodically_clean_Firefox_memory.js
├── YTColors26.uc.js
├── YTColors26/
│ └── YTColors26Child.sys.mjs
├── YTPlaybackFixer.uc.js
└── YTPlaybackFixer/
└── YTPlaybackFixerChild.sys.mjs
Important
The two YouTube scripts need their respective .sys.mjs child modules and a working chrome://userscripts/content/ mapping. A .uc.js file alone is insufficient. The memory-cleaner file has a plain .js extension; your loader may require explicit registration or renaming.
These are privileged browser scripts, not Tampermonkey/Violentmonkey scripts. Browser updates can break internal APIs or selectors.
File: highlightTab.uc.js · Version: 3.4.2
What it offers
- 64 preset colors in a compact 8 × 8 grid.
- Normal and Zen-style pickers in the same menu; HEX/RGB values supported.
- Full background or Border only styling.
- Color only the folder header or the folder and its contents.
- Individual tab color overrides, multi-tab selection, saved colors, and automatic text contrast.
How to use: Right-click a tab → Highlight Tab(s); or right-click a Zen folder → Highlight Folder. Alt + left-click a tab to toggle the quick color.
Quick customization: Edit these values at the top of the script:
const FONT_SIZE = '11px';
const QUICK_COLOR = '#C5DE92';Folder inheritance uses Zen-specific internals, so it may be affected by browser updates or other sidebar mods.
File: dblclickDuplicateTab.uc.js · Version: 1.0
Double-click an existing tab to duplicate it and switch to the copy.
To duplicate in the background, use the alternative gBrowser.duplicateTab(tab) line already included in the script instead of assigning gBrowser.selectedTab.
File: extreme-memory-controller.uc.js · Version: 34.3
Monitors tab activity, detects audio/Picture-in-Picture, attempts suspension, discards eligible inactive tabs, and requests memory cleanup.
| Setting | Default |
|---|---|
| Suspend inactive regular tabs | 10 min |
| Discard inactive regular tabs | 15 min |
| Discard inactive pinned tabs | 25 min |
| Memory cleanup | Every 30 min |
Customize: IDLE_SUSPEND, IDLE_DISCARD, PINNED_DISCARD, and CLEAN_MEMORY_PERIOD near the top of the file.
Caution
This script can interrupt background activity and unload tabs, including pinned tabs. Unsaved work may be lost. Test cautiously; its suspension API is browser-version-dependent.
File: Periodically_clean_Firefox_memory.js
Requests Firefox garbage collection and memory minimization at a configurable interval; it does not guarantee lower RAM usage.
const cleanMemory_period = 2 * 60 * 1000; // 2 minutesTip: Try this script or Extreme Memory Controller first, not both at once. The source header credits garywill/firefoxtaskmonitor and notes testing with Firefox 102.
Files: YTColors26.uc.js + YTColors26Child.sys.mjs
- Colors video cards based on their upload age; includes live/upcoming categories.
- Dims older video cards and can mark the last-seen subscriptions video.
- Uses visibility-based processing and reacts to new cards during infinite scrolling.
Customize: Edit COLORS and OLD_OPACITY in the child module. YouTube layout and localized age labels can affect detection.
Files: YTPlaybackFixer.uc.js + YTPlaybackFixerChild.sys.mjs
- Tries to recover from playback errors, stalls, and buffering problems.
- Adds playback status/quality controls near supported YouTube video titles.
- Offers quality requests from lower resolutions through
hd1080,hd1440,hd2160, andhighres, plusauto/Disable.
Warning
YouTube can override quality API requests. Selecting 4K does not guarantee 4K playback. Confirm with Settings → Quality and Stats for Nerds. Recovery may restart playback.
The child module retains attribution to upstream YouTube – Playback Fixer by brizzle.
| Problem | First thing to check |
|---|---|
| Script/menu doesn't appear | Loader configuration, correct path, startup cache, duplicate scripts. |
| YouTube actor fails | Correct .sys.mjs companion path and chrome://userscripts/content/ mapping. |
| Zen folder children stay uncolored | Highlight Folder → Apply folder color to → Folder + all tabs & subfolders. |
| Colors disappear on restart | Restored tab session / unchanged Zen folder ID. |
| Playback quality doesn't change | Verify actual quality in Stats for Nerds; YouTube may override it. |
| Tabs reload unexpectedly | Disable memory-controller scripts or lengthen inactivity timeouts. |
Browser Console: Ctrl + Shift + J — include relevant errors, your Firefox/Zen version, and the script name when reporting an issue.
Acknowledgements: fx-autoconfig · Ulf3000 / Firefox Highlight Tabs · garywill / firefoxtaskmonitor · brizzle (YouTube Playback Fixer upstream).
Contributions and compatibility reports are welcome: Open an issue or submit a pull request. Include your browser version, loader, affected script, and reproduction steps.
↑ Back to top · Browse all scripts · Report an issue
Community-maintained experiments · Not affiliated with Mozilla, Zen Browser, or YouTube

