Persist Appearance options to localStorage avatar

Persist Appearance options to localStorage

Pricing

from $1.50 / 1,000 results

Go to Apify Store
Persist Appearance options to localStorage

Persist Appearance options to localStorage

Persist UI appearance options (nodes, edges, labels) to localStorage, a repetitive task that could be automated with a tool.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

Lore Nest

Lore Nest

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Categories

Share

Persist UI appearance options (nodes, edges, labels) to localStorage, a repetitive task that could be automated with a tool.

This Actor stores UI appearance options in localStorage, accepting a payload of UI configuration and persisting it for later retrieval. By automating this repetitive task, it removes the need for manual storage calls and ensures appearance settings are reliably captured in a structured JSON format.

Use Cases

  • Save user-customized graph views — Persist a user's preferred node styling, edge styling, and label display settings so the same visualization is restored the next time they open the application.
  • Sync appearance presets across sessions — Store a single named appearance configuration (nodes, edges, labels) in localStorage so that reopening the tool or browser tab reloads the exact same visual layout.
  • Capture presentation-ready configurations — Save a polished appearance setup (such as specific node colors, edge weights, and label visibility) before sharing a visualization with stakeholders, ensuring the look is preserved.
  • Persist developer debugging profiles — When iterating on graph visualizations, store different combinations of node/edge/label options to localStorage and switch between them without re-entering values each time.
  • Maintain a single canonical appearance record — Overwrite the appearance key in localStorage with the latest settings on every run, guaranteeing that only the most recent configuration is retained as the source of truth.

How It Works

The Actor receives a dictionary payload and filters it to retain only the keys nodes, edges, and labels, discarding any extraneous fields. These filtered values are passed into an AppearanceOptions dataclass, serialized to JSON via asdict, and then written to an internal _local_storage dictionary under the key "appearance". The Actor returns a {"status": "success", "data": payload} response, confirming the options have been stored. Because storage is held in an in-memory dictionary, the persistence is scoped to the Actor's own runtime rather than the browser's actual localStorage.

Usage on Apify

Run it directly from the Apify Console ("Start"/"Try for free"), or call it via the API:

POST https://api.apify.com/v2/acts/persist-appearance-options-to-localstorage/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
Content-Type: application/json
{}

Pricing

Pay-per-event, billed automatically by Apify -- no separate account or payment step:

  • Actor start: $0.00005 per GB of memory (minimum one event per run)
  • Result: $0.005 per item returned -- this is the primary, usage-based charge

Also independently available at $0.0100 USDC (Base) per call via the x402 payment protocol (POST /tools/persist-appearance-options-to-localstorage) for callers outside the Apify platform.

Example output

Real output captured from this tool's own build-time smoke test (input above):

{
"status": "success",
"data": {}
}