Firefox Add-On Support for Widgetify Extension #364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Firefox Support to Widgetify Extension
This PR adds full Firefox compatibility to the Widgetify extension, allowing users to install and use it in Firefox browsers.
Why This Is Needed
Testing
web-ext)Files Changed
src/layouts/bookmark/utils/tabManager.ts- Added Firefox compatibility check for tab groupspackage.json- Addedwebextension-polyfilldependencyChanges Summary
This explains how I converted the Widgetify Chrome extension to work with Firefox, what we fixed, and how to build and install it.
src/layouts/bookmark/utils/tabManager.tswebextension-polyfillrequired for cross-browser compatibilityweb-extfor Firefox extension development and testingWhy This Was Needed
The extension was built for Chrome but uses WebExtensions APIs, which Firefox also supports. However, there were a few Chrome-specific features that needed adjustment. The main issue was that Chrome uses
chrome.*APIs while Firefox usesbrowser.*APIs - they're similar but not identical.Why webextension-polyfill?
The extension uses
@wxt-dev/webextension-polyfill, which is a wrapper that needs the actualwebextension-polyfillpackage to work. This polyfill is crucial because:browser.*API that works across both Chrome and Firefoxbrowser.*APIs return Promises, while Chrome'schrome.*APIs use callbacks - the polyfill normalizes thisWhat Has Fixed
Tab Groups API (Chrome-only feature)
Problem: The bookmark feature tried to group tabs, but Firefox doesn't support tab groups.
Fix: Added a check before using tab groups in
src/layouts/bookmark/utils/tabManager.ts:Build & Install
1. Install Dependencies
The
--legacy-peer-depsflag is needed becausereact-joyrideexpects React 15-18, but the project uses React 19. This is safe - the extension works fine.2. Build for Firefox
This creates the extension in
.output/firefox-mv2/3. Create ZIP Package
This creates
.output/widgetify-webapp-1.0.59-firefox.zip4. Installing in Firefox (Debug mode)
Unpacked extension method:
about:debugging→ Load Temporary Add-on on FirefoxThis installs without needing Mozilla's signature:
about:debugging.output/firefox-mv2/manifest.jsonThe extension will stay installed (despite the "Temporary" label) until you manually remove it.
This launches Firefox with the extension and auto-reloads on file changes.
Future: Submit to Mozilla Add-ons (AMO) for signed distribution