Skip to content

Streamfinity/Extension

Repository files navigation

Chrome Web Store Version Mozilla Add-on Version Microsoft Edge Store Version


Download

Crome Web Store Rating Chrome Users Firefox Rating Firefox Downloads

Preview

Contributing

Note

This project is provided as-is and we are not actively promoting contributions. However, if you wish to contribute to this repository, you will have to sign a Contributor License Agreement (CLA) in order for you PRs to be considered for merging.

Adding a new language

  1. Create a new JSON file locales/{locale}.json with the according ISO 639 2-letter language code based on the default en.json.
  2. Import the new JSON file in the i18n.js file.

Setup

Build Lint GitHub License

npm install

Create local env file

MANIFEST_VERSION=3     # available: 3, 2
BROWSER_TARGET=chrome  # available: chrome, firefox

MANIFEST_HOST_API=*://*.streamfinity.code/*
MANIFEST_HOST_FRONTEND=*://localhost:3000/*

VITE_API_URL=http://streamfinity.code
VITE_FRONTEND_URL=http://localhost:3000

VITE_OAUTH_CLIENT_ID=

Commands

Development

Firefox

Rebuilds extension on file changes. Requires a reload of the extension (and page reload if using content scripts).

npm run dev:firefox

Chrome

Hot Module Reloading is used to load changes inline without requiring extension rebuilds and extension/page reloads. Currently only works in Chromium based browsers.

npm run dev:chrome

Production

Minifies and optimizes extension build.

Important

You need to explicitly prepend the MANIFEST_VERSION and BROWSER_TARGET variables if not specified in a .env.local file.

npm run build

Load Extension in Browser

Firefox

  • Open about:debugging page
  • Navigate to "This Firefox" tab
  • Click the "Load Temporary Add-on..." button
  • Navigate to the dist/ folder of this repository

Chrome

  • Open chrome://extensions/ page
  • Toggle "Developmer mode" in the top right corner
  • Click the "Load unpacked" button
  • Navigate to the dist/ folder of this repository

Installation

Firefox

Option 1: Install signed .xpi

  • Download the Firefox_X.X.X_mv2_signed.xpi version
  • Firefox will prompt you to install the extension

Option 2: Install via unpacked .zip

Option 3: Install unsigned .xpi

This is only possible if you are on Firefox Developer or Nightly Edition.

  • Navigate to about:config
  • Search for xpinstall.signatures.required and double click until the value shows false
  • Download the Firefox_X.X.X_mv2.xpi version
  • Firefox will prompt you to install the extension

Chrome

  • Download extension (*_mv3.zip)
  • Open chrome://extensions/ page
  • Toggle "Developmer mode" in the top right corner
  • Drag the .zip file into the browser window (or select the extracted the parent folder via "Load unpacked")

Deployment & Publishing

By tagging a commit, the Extension will be built and sent to the Chrome Web Store (Manifest 3) & Mozilla AMO platform (Manifest 2).

  • Commits tagged with -dev (eg. 0.0.1-dev.1) will only be signed (Mozilla AMO) or uploaded in unlisted (Chrome Web Store).
  • Commits without development tags will be published instantly (eg. 0.0.1)
  • The core version prefix must be unique across all tags. There can not be a 0.0.1 and 0.0.1-dev.1 (or 0.0.1-dev.2 etc.) at the same time because the Extensions Manifest requires all versions to be in a {int}.{int}.{int} format. Thus the specific version prefix will also be unique on the Chrome Web Store and Mozilla AMO platform.

Known Issues

  • Popup Script not working in Chrome due to injected inline JS
  • Firefox is not yet supporting service workers: stackoverflow.com
  • HMR not available in Firefox:

Security Policy ⚠️

If you have discovered a vulnerability or security related issue, please send a mail at [email protected]. Do not open an issue on GitHub.

Authors

License

CC BY-ND 4.0 Deed. Please see the License File for more information.

Third Party Licenses

Credits

Based on samrum/vite-plugin-web-extension (via create-vite-plugin-web-extension).