Browser-local "saved" content — the no-server equivalent of the old "Save as
Expansion" / "Save Preset". Custom expansions ({name: text}, usable as <name>)
and custom presets ({name: settingsPatch}) live in localStorage only.
- Description:
Browser-local "saved" content — the no-server equivalent of the old "Save as Expansion" / "Save Preset". Custom expansions (
{name: text}, usable as<name>) and custom presets ({name: settingsPatch}) live in localStorage only.
- Source:
Methods
(static) getCustomExpansions() → {object}
Returns:
The custom expansions ({ name: text }, usable as <name>).
- Type
- object
(static) getCustomPresets() → {object}
Returns:
The custom presets ({ name: settingsPatch }).
- Type
- object
(static) removeCustomExpansion(name) → {void}
- Description:
Remove a custom expansion.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The expansion name. |
Returns:
- Type
- void
(static) removeCustomPreset(name) → {void}
- Description:
Remove a custom preset.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The preset name. |
Returns:
- Type
- void
(static) saveCustomExpansion(name, text) → {void}
- Description:
Save (or overwrite) a custom expansion.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The expansion name. |
text |
string | The expansion text. |
Returns:
- Type
- void
(static) saveCustomPreset(name, patch) → {void}
- Description:
Save (or overwrite) a custom preset.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The preset name. |
patch |
object | The settings patch the preset applies. |
Returns:
- Type
- void
(inner) read(key) → {object}
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | The localStorage key. |
Returns:
The parsed object (or {} on miss / parse error).
- Type
- object
(inner) write(key, obj) → {void}
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | The localStorage key. |
obj |
object | The object to store. |
Returns:
- Type
- void