Skip to content

dan-lovelace/word-replacer-max

Repository files navigation

Word Replace Max Word Replacer Max

A browser extension for replacing text on webpages.

Available for chrome logo Chrome and firefox logo Firefox

replace words and phrases flexible domain settings ruleset sharing highlight and replace

Building locally

To get started, you'll need:

Instructions

Configure environment

Set your desired target environment using NODE_ENV:

export NODE_ENV=development

Steps

  1. Install dependencies
    yarn install
    
    • ⚠️ IMPORTANT: In order to test in Firefox, you need to build AmplifyJS locally and link its @aws-amplify/core package to this project (bug report here: aws-amplify/amplify-js#14180):
      1. Update the fork https://github.com/dan-lovelace/amplify-js and clone it
      2. Checkout branch core/fix-convert-firefox-context
      3. Run yarn build
      4. Run yarn link-all
      5. Change back into the WRM repository
      6. Run yarn link @aws-amplify/core
      7. Run yarn install (use with the --force flag when unlinking)
  2. Run the build command using whichever manifest version you desire (2 or 3)
    yarn build 3
    
  3. The resulting build exists in the dist directory which can be used to load an unpacked extension in your browser

Developing

After following the dependency installation instructions above, use the start:* command to start a development server using a given manifest version. For version 2:

NODE_ENV=development yarn start:2

File changes can be seen in real-time and may require the extension to be reloaded.

Running tests

Prerequisites

  • A file packages/popup/cypress/.env.private populated with testing credentials - Contact the repository owner if you do not have these.

Steps

To run all tests:

  1. Start the Popup development server in test mode
    VITE_MODE=test yarn workspace @worm/popup dev
  2. Use the "test all" command
    yarn test:all

See the individual test:* commands in package.json to run specific types of tests.

Packaging

  1. Bump the version in package.json
  2. Run the package command, targeting the correct manifest version
    yarn package 3
    
  3. The resulting package exists in the versions directory which is to be used when uploading a new version to the extension stores

About

A browser extension for replacing text on web pages

Resources

License

Stars

Watchers

Forks

Languages