Skip to content

fix(zen-browser): replace transparent-zen with patched version that respects ignore list#171

Open
dbeley wants to merge 1 commit into
mainfrom
fix/patched-transparent-zen
Open

fix(zen-browser): replace transparent-zen with patched version that respects ignore list#171
dbeley wants to merge 1 commit into
mainfrom
fix/patched-transparent-zen

Conversation

@dbeley

@dbeley dbeley commented Jun 25, 2026

Copy link
Copy Markdown
Owner

The upstream transparent-zen addon has a bug where blacklisted tabs (in the ignore list) still get transparency styles applied when switching tabs. This happens because the background script (applyStyles) injects CSS into all tabs in the current window, ignoring the blacklist.

This PR replaces the NUR transparent-zen package with a version built from a patched fork containing two fixes:

Fix 1 — Background script (applyStyles)

When injecting dynamic-transparency.css globally (no specific domains targetted), the background script now reads the extension settings and checks each tab's hostname against blacklistedDomains. Tabs whose domain is in the ignore list are skipped (or only included if in whitelist mode).

Fix 2 — Content script (updateSettings handler)

When the user adds a domain to the ignore list from the settings page, an updateSettings message is sent but there was no handler for it. Now the content script re-evaluates and removes transparency styles from tabs that should no longer have them — no manual reload needed.

Changes

  • apps/zen-browser/transparent-zen-patched.nix — builds the patched extension from source using buildNpmPackage
  • modules/overlays.nix — overlay replaces nur.repos.rycee.firefox-addons.transparent-zen with the patched version, affecting both Firefox and Zen Browser

…respects ignore list

The upstream transparent-zen has a bug: when switching tabs, blacklisted
tabs (in the ignore list) still get transparency styles applied because
the background script injects CSS into ALL tabs regardless of the
blacklist.

This adds a Nix overlay that replaces the NUR transparent-zen package
with a version built from a patched fork, containing two fixes:

1. Background script (applyStyles): when injecting styles globally, check
   each tab's hostname against the blacklistedDomains setting and skip
   tabs that should be excluded (or only include whitelisted ones in
   whitelist mode).

2. Content script (updateSettings handler): when settings change (e.g.
   a domain is added to the ignore list), re-evaluate and remove
   transparency styles from tabs that are now excluded.

The package is built from source using buildNpmPackage, with patches
already applied on the forked branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant