web-app/lib/share

Share links — encode the current settings (minus secrets) into the URL hash so a setup can be shared with no server storage.

Description:
  • Share links — encode the current settings (minus secrets) into the URL hash so a setup can be shared with no server storage.

Source:

Methods

(static) readSharedSettings(hashopt) → {object|null}

Description:
  • Decode settings from a share-link hash.

Source:
Parameters:
Name Type Attributes Description
hash string <optional>

The URL hash (defaults to location.hash).

Returns:

The decoded settings, or null if none/invalid.

Type
object | null

(static) shareUrl(settings) → {string}

Description:
  • Encode the settings (minus keys) into a shareable URL hash.

Source:
Parameters:
Name Type Description
settings object

The current settings.

Returns:

The share URL.

Type
string

(inner) fromBase64Url(b64) → {string}

Source:
Parameters:
Name Type Description
b64 string

URL-safe base64.

Returns:

The decoded string.

Type
string

(inner) toBase64Url(str) → {string}

Source:
Parameters:
Name Type Description
str string

The string to encode.

Returns:

URL-safe base64.

Type
string