feat(extension): add Firefox WebExtension support
Testing / remote-protocol-compat (0.9.5) (push) Successful in 48s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 47s
Build & Publish Package / publish (push) Successful in 46s
Package Extension / package-extension (push) Successful in 59s
Testing / test (push) Failing after 50s
Testing / remote-protocol-compat (0.9.5) (push) Successful in 48s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 47s
Build & Publish Package / publish (push) Successful in 46s
Package Extension / package-extension (push) Successful in 59s
Testing / test (push) Failing after 50s
- Add a neutral WebExtension API adapter that uses Firefox browser.* or Chromium chrome.* without mutating globals. - Switch extension runtime code to the adapter and add Firefox-specific typings for tabs, windows, tab groups, storage, scripting, and native messaging ports. - Fix Firefox temporary add-on instructions to load the packaged manifest with background.scripts instead of the Chromium service worker manifest. - Detect Firefox in clients.list via runtime.getBrowserInfo and keep Chromium user-agent fallback support. - Make navigate.open wait briefly for Firefox to replace initial about:blank with the requested URL. - Add JS coverage for API selection, clients.list browser detection, and Firefox navigate.open URL polling. - Bump package and extension version to 0.15.2.
This commit is contained in:
@@ -78,9 +78,14 @@ def cmd_install(browser):
|
||||
console.print("\n[bold]Step 1:[/bold] Load the extension in your browser")
|
||||
console.print(f" 1. Open [cyan]{ext_url}[/cyan]")
|
||||
if browser == "firefox":
|
||||
console.print(" 2. Click [bold]Load Temporary Add-on...[/bold]")
|
||||
console.print(f" 3. Select: [cyan]{Path(__file__).parent.parent.parent / 'extension' / 'manifest.json'}[/cyan]")
|
||||
console.print(f" 4. Firefox extension ID is [cyan]{FIREFOX_EXTENSION_ID}[/cyan]")
|
||||
repo_root = Path(__file__).parent.parent.parent
|
||||
firefox_manifest = repo_root / "dist" / "extension-package-firefox" / "manifest.json"
|
||||
console.print(" 2. Build the Firefox-compatible temporary extension:")
|
||||
console.print(" [cyan]npm run package:extension:firefox[/cyan]")
|
||||
console.print(" 3. Click [bold]Load Temporary Add-on...[/bold]")
|
||||
console.print(f" 4. Select: [cyan]{firefox_manifest}[/cyan]")
|
||||
console.print(" Do not select extension/manifest.json; Firefox currently rejects background.service_worker there.")
|
||||
console.print(f" 5. Firefox extension ID is [cyan]{FIREFOX_EXTENSION_ID}[/cyan]")
|
||||
console.print(" Note: Firefox support is experimental; tab-group commands require browser tab group APIs.\n")
|
||||
else:
|
||||
console.print(" 2. Enable [bold]Developer mode[/bold] (top-right toggle)")
|
||||
|
||||
Reference in New Issue
Block a user