Skip to content

feat: added native Firefox support and dual-browser build process#2

Open
AnkanMisra wants to merge 3 commits into
T3-Content:mainfrom
AnkanMisra:main
Open

feat: added native Firefox support and dual-browser build process#2
AnkanMisra wants to merge 3 commits into
T3-Content:mainfrom
AnkanMisra:main

Conversation

@AnkanMisra

@AnkanMisra AnkanMisra commented Mar 24, 2026

Copy link
Copy Markdown

This PR introduces native Firefox compatibility using the existing Manifest V3 codebase, alongside a refined build pipeline for multi store distribution

Key Changes

  • Firefox Manifest Requirements: Added the required browser_specific_settings.gecko block to manifest.json for Mozilla Add-on (AMO) distribution
  • Targeted Build Artifacts: Refactored scripts/build.sh to generate distinct -chrome and -firefox release archives. The script dynamically strips the Gecko configuration from the Chrome manifest before zipping, ensuring a clean, warning-free package for the Chrome Web Store
  • Robust Link Interception: Updated the DOM query selector in content.js to use the CSS case-insensitive flag (a[href^="mailto:" i]), ensuring mixed-case links (e.g., Mailto:) are reliably intercepted
  • Documentation: Integrated concise Firefox local testing and release steps into the README.md to match the existing Chrome documentation format

Summary by CodeRabbit

  • New Features

    • Added Firefox browser support to the extension.
  • Bug Fixes

    • Email link detection now works case-insensitively.
  • Documentation

    • Updated installation and deployment instructions for multi-browser compatibility.

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The extension is being extended to support both Chrome and Firefox browsers. Firefox-specific manifest settings are added, the build process is refactored to generate separate platform-specific archives with platform-appropriate manifests, HTML link matching is improved with case-insensitive selector syntax, and documentation is updated with cross-browser guidance and publishing instructions.

Changes

Cohort / File(s) Summary
Documentation
README.md
Updated project description to reflect cross-browser support (Chrome and Firefox). Added Firefox local installation steps, changed build instructions to generate separate versioned archives for each platform, generalized smoke-test guidance to include Firefox, and expanded publishing steps to include Mozilla Add-ons Developer Hub.
Browser Configuration
manifest.json
Added Firefox-specific settings under browser_specific_settings.gecko with extension ID and minimum version requirement. Reformatted JSON arrays (permissions, content_scripts fields) from multi-line to single-line for compactness.
Content Script
content.js
Updated anchor element selector to match mailto: links case-insensitively using the i flag in CSS selector, replacing separate lowercase/uppercase prefix selectors. Reformatted addressPart assignment with line breaks.
Build Process
scripts/build.sh
Refactored build script to generate two platform-specific ZIP archives (Chrome and Firefox) instead of one generic archive. Implements dynamic manifest manipulation: removes Firefox-specific settings for Chrome archive, restores original manifest for Firefox archive. Updated output logging to display both archive paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Two browsers now hop side-by-side,
Chrome and Firefox, bundled with pride!
Case-insensitive links take flight,
Manifests split, build scripts unite—
Cross-platform dreams come true today! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding Firefox support and implementing a dual-browser build process, which are the core objectives of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AnkanMisra AnkanMisra changed the title Added native Firefox support and dual-browser build process feat: added native Firefox support and dual-browser build process Mar 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
README.md (1)

15-19: Consider noting Firefox temporary add-on lifecycle.

Optional: add one sentence that “Load Temporary Add-on” is cleared on Firefox restart, so local reloading is expected.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 15 - 19, Add a brief note to the Firefox instructions
stating that "Load Temporary Add-on" is cleared on Firefox restart so the
temporary extension must be reloaded after restarting the browser; update the
Firefox section (the steps referencing about:debugging#/runtime/this-firefox and
selecting manifest.json) to include this single-sentence lifecycle note so users
know local reloading is expected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Around line 15-19: Add a brief note to the Firefox instructions stating that
"Load Temporary Add-on" is cleared on Firefox restart so the temporary extension
must be reloaded after restarting the browser; update the Firefox section (the
steps referencing about:debugging#/runtime/this-firefox and selecting
manifest.json) to include this single-sentence lifecycle note so users know
local reloading is expected.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6c3ebb1b-4da9-416b-9fff-a0febbcfb53b

📥 Commits

Reviewing files that changed from the base of the PR and between 1633edb and 5a7006f.

📒 Files selected for processing (4)
  • README.md
  • content.js
  • manifest.json
  • scripts/build.sh

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