Skip to content

Save extension settings to browser.storage #331

@ACTCD

Description

@ACTCD

Ref: #264 (comment)

Current extension settings and index information, etc. are stored in:
~/Library/Containers/com.userscripts.macos.Userscripts-Extension/Data/Documents/manifest.json

It writes to the filesystem through a native application layer (Swift) proxy.

Saving them rescheduled to browser.storage.local has many benefits:

  • Directly use the browser extension storage API to reduce extension complexity.
  • The settings can be directly read in the content script, reducing a layer of message relay.
  • Prepare scripts, indexes and other information in advance to improve the injection speed.
  • Use its asynchrony to improve interface response and access flexibility.
  • Store script update information and persist update check data for front-end use.

Metadata

Metadata

Assignees

Labels

maintenanceChores and refactoring

Projects

Status

Release

Relationships

None yet

Development

No branches or pull requests

Issue actions