Skip to content

Persist enabled addons #2

Description

@DNin01

Toggling addons is one of the biggest parts of personalizing SA, so TM should save addon enabled states to storage.

The biggest challenge here is building a storage structure that can manage enabled states across SA versions, accounting for changes in the addon collection. The system should expect addons to possibly not exist in the selected version. Ideally, stored data shouldn't be altered or lost when going up or down versions.

Considering this, my concept is as follows:

states: {
  copy: 0,
  dark: 0,
  smsg: 1,
  ...
}

Features:

  • A storage key which starts empty. Non-defined values indicate default states.
  • Addon "nicknames" which can be connected to more than one addon ID (e.g. data-category-tweaks and data-category-tweaks-v2, whichever one exists in the version).
  • Four-letter keys and single-digit values—exactly 7 bytes per stringified item including delimiters, in case storage size is a concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions