Interface: UserSettings

UserSettings

Methods

getPreviewCount() → {number}

Gets the number of previews that the user has seen.

  • If the storage isn't available, then -1 is returned.
  • If the value in storage is not a number it will override stored value to 0
Source:
Returns:
Type
number

isPagePreviewsEnabled() → {boolean}

Gets whether the user has previously enabled Page Previews.

N.B. that if the user hasn't previously enabled or disabled Page Previews, i.e. userSettings.storePagePreviewsEnabled(true), then they are treated as if they have enabled them.

Source:
Returns:
Type
boolean

isReferencePreviewsEnabled() → {boolean}

Source:
Returns:
Type
boolean

storePagePreviewsEnabled(enabled)

Permanently persists (typically in localStorage) whether the user has enabled Page Previews.

Parameters:
Name Type Description
enabled boolean
Source:

storePreviewCount(count)

Sets the number of previews that the user has seen.

Parameters:
Name Type Description
count number
Source:

storeReferencePreviewsEnabled(enabled)

Parameters:
Name Type Description
enabled boolean
Source: