Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🦊 Firefox userChromeJS

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.

Firefox Zen Browser License: MPL 2.0

🚀 Install · 🎨 Appearance · 🧠 Memory · ▶️ YouTube · 🛠 Help

Note

Everything below is collapsed by default. Click a section's arrow to read it. Install only the scripts you want.

Choose a script

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.
▶️ YouTube YTPlaybackFixer Attempt playback recovery and preferred-quality selection.

🚀 · Getting started — Requirements & installation

What you need

  • 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 in 4 steps

  1. Install and configure your userChrome.js loader following its documentation.
  2. Copy the desired files from chrome/JS into the matching folder in your profile. Keep required subfolders.
  3. Remove older copies of the same script to avoid duplicates.
  4. 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.

↑ Back to top

🎨 · Tab Highlight Plus — Color tabs & Zen folders

image image image image image

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.

↑ Back to top

🖱️· Double Click Duplicate Tab — Faster tab duplication

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.

↑ Back to top

🧠 · Extreme Memory Controller — Idle tab management --OBSOLETE--

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.

↑ Back to top

🧹 · Periodic Memory Cleaner — Simple timed cleanup

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 minutes

Tip: Try this script or Extreme Memory Controller first, not both at once. The source header credits garywill/firefoxtaskmonitor and notes testing with Firefox 102.

↑ Back to top

🌈 · YTColors26 — YouTube age-based video borders

image

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.

↑ Back to top

▶️ · YTPlaybackFixer — Playback recovery & quality control

image

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, and highres, plus auto / 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.

↑ Back to top

🛠️ · Troubleshooting — Common fixes

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.

↑ Back to top

📜· License, credits & contributions

This repository includes an [MPL-2.0 license](LICENSE). Individual scripts can also include third-party copyright and license notices; **preserve those notices** when reusing code.

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