This is a template for creating multi-browser extensions. It provides a starting point for developing browser extensions that can be used across different browsers such as Chrome and Firefox.
- Cross-browser compatibility
- Easy setup and configuration
- Modular architecture
- Support for common extension functionalities
- Includes a popup and options page example
- Linting with ESLint
src
: contains the source code for the extension broken out into modulesdist
: contains the built extensionexport
: contains the packaged extension.readme
: contains images for the readme.github
: contains GitHub Actions workflows (This folder can be deleted if yo do not intend to use GitHub Actions)workflows
: contains the workflows for the repositoryCODEOWNERS
: contains the code owners for the repositorydependabot.yml
: contains the configuration for Dependabot
To get started with this template, follow these steps:
- Clone the repository:
git clone https://github.com/xn4p4lm-org/multi-browser-extension-template.git
- Install the dependencies:
yarn install
- Customize the extension according to your needs
- Build the extension:
yarn dev
- Load the extension in your browser using the
dist
directory- For Chrome: Open
chrome://extensions/
and enable Developer mode. Click on "Load unpacked" and select thedist
directory. - For Firefox: Open
about:debugging
and click on "This Firefox". Click on "Load Temporary Add-on" and select thedist/manifest.json
file.
- For Chrome: Open
To build the extension, you just need to run yarn package
. This will create a zip file in the export
directory that can be uploaded to the Chrome Web Store or Mozilla Add-ons.
To lint the code, run yarn lint
. This will run ESLint on the src
directory with debug mode and show any errors or warnings.
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
This project is licensed under the MIT License.
© 2024 Diana (@xN4P4LM) et al.