Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 2.4 KB

CONTRIBUTING.md

File metadata and controls

94 lines (64 loc) · 2.4 KB

Contributing

Installation

npm install

Running the extension

Depending on the target browser, you need to build the extension for Manifest version 2 or 3.

This can be done with:

  • npm run-script watch - where the extension will be built into the directory dist-mv2
  • npm run-script watch:mv3 - where the extension will be built into the directory dist-mv3

You can then follow the guide for how to load the extension into your browser of choice.

The project includes scripts for running the extension in Firefox and Chromium using the WebExtension tool for your convenience.

Firefox

npm run-script watch
npm run-script start:firefox

Chrome & Chromium Browsers

By default start:chromium will launch Google Chrome:

npm run-script watch:mv3
npm run-script start:chromium

To launch alternative Chromium browsers like Edge or Brave you can append the path to the binary suitable for your operating system:

This example is for launching Brave on MacOS

npm run-script start:chromium -- --chromium-binary /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser

Safari

Safari only supports web extensions bundled inside a native Mac app. If you are not building for development, Safari only loads web extensions if their containing apps are distributed via the Mac App Store, or if you select “Allow unsigned extensionsʺ from the Debug menu on each launch (requires authentication).

To build for development:

  1. Build the extension for manifest version 2:

    npm run build:mv2-safari
  2. Update the project's marketing version from the manifest.

    swift Rango/Build/UpdateRangoVersion.swift
  3. Copy the template xcconfig to a user-specific one.

    cp Rango/Build/UserSpecific{.template,}.xcconfig
  4. Open the Rango project in Xcode.

    xed Rango
  5. Edit Build » UserSpecific.xcconfig according to the comments in the file.

  6. Build and run the project.

  7. Enable the extension in Safari’s Preferences.