Manifest V3 Migration
Here is summary of changes:
- A new build target can be built with
npm run webext chromium_v3
. It creates a extension targeting manifest v3 - A offscreen webpage can be created, with snowflake proxy running on it.
- The action popup is able to control if snowflake is enabled, and show user stats including 24h rolling stats.
- The enabled state of snowflake is stored persistently.
- The consent page is opened automatically if consent is not already given.
- 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:
- 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. - 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:
- Refactoring and code style improvement
Future Improvement:
- Error feedback to action popup.
The jslint error is a result of it not targeting most recent version of javascript.
(See also: #29 (closed))
Edited by shelikhoo