Skip to content

Manifest V3 Migration

Here is summary of changes:

  1. A new build target can be built with npm run webext chromium_v3. It creates a extension targeting manifest v3
  2. A offscreen webpage can be created, with snowflake proxy running on it.
  3. The action popup is able to control if snowflake is enabled, and show user stats including 24h rolling stats.
  4. The enabled state of snowflake is stored persistently.
  5. The consent page is opened automatically if consent is not already given.
  6. The consent page allow user to give consent to running snowflake. The consent choice data is stored persistently.

Here is a summary of coding design choice:

  1. a new initialization script init-webextv3.js is created for manifest v3 related scripting. It allow the reuse of most the code base without constraining the architecture.
  2. distinct messaging sendMessage is used instead of port. The service worker in Chrome MV3 will become inactive automatically and it was unclear how port would interact with service worker life cycle.

Still lacking, thus in draft:

  1. Refactoring and code style improvement

Future Improvement:

  1. Error feedback to action popup.

The jslint error is a result of it not targeting most recent version of javascript.

(See also: #29)

Edited by shelikhoo

Merge request reports