$ show benzBrake/FirefoxCustomize
This repository is a comprehensive, hand-crafted collection of Firefox customization resources, primarily consisting of userChromeJS scripts, user styles, user scripts, themes, and configuration backups. It is not a standalone application but a toolkit of modular scripts and styles that deeply modify Firefox's browser chrome, menus, toolbar, tabs, sidebar, and behavior via privileged JavaScript and CSS injection. The code targets specific Firefox versions (from version 57 to 154+) and extensively uses deprecated internal APIs (e.g., `Components`, `Cu.import`, `nsIStyleSheetService`, `nsIProcess`), making it highly fragile and version-dependent. Many scripts are marked as archived or no longer updated. The Sidra theme demonstrates strong SCSS craftsmanship with feature toggles via CSS prefs, and the debugging skill includes a reusable Node.js RDP client. Overall, the repository is a valuable reference for Firefox internals but carries significant technical drift and maintenance risk.
The LLM identified 5 files worth highlighting for reuse:
Provides `Option` and `NotOption` SCSS mixins that conditionally include styles based on Firefox preferences (`-moz-bool-pref`, `-moz-pref`). This pattern enables a CSS-only feature toggle system without JavaScript, making it reusable for any Firefox theme that wants to offer user-customizable options via about:config.
A self-contained Node.js module that implements the Firefox Remote Debugging Protocol (RDP) client. It handles packet encoding/decoding, connection management, and evaluation of JavaScript in the browser context. This is a non-trivial, reusable component that can be extracted for any project needing programmatic control of Firefox's debugging capabilities.
A full-featured user style manager that loads, enables/disables, and edits CSS files from a folder, with live style injection via `nsIStyleSheetService`. It includes an embedded editor (`edit.xhtml`), file watching, and preference persistence. The `UserStyle` class and `DisabledSet` extension are well-structured patterns for managing collections of styles.
Loads CSS files from a designated folder and registers them as style sheets at different levels (AUTHOR, USER, AGENT). Supports remote installation from GreasyFork with version checking and update detection, using a JSWindowActor for cross-process communication. The sandbox configuration pattern and safe file operations make it a reusable model for any CSS injection loader.
A Tampermonkey script that enhances the 115 cloud storage website by adding file upload/import functionality. It implements custom RSA, SHA1, and XOR encryption to interact with 115's private API. This demonstrates reverse-engineering of a proprietary API and could serve as a reference for similar cloud storage integrations.