SettingsAPI

changeSetting(setting, value, attributes, persistent)
Changes the setting to the given value. Attributes can be used to set boundaries or a set of possible values. The priority parameter can be used to specify a priority – by default, the highest priority (SETTINGS_API) is used. Lower priorities are typically used for values read from the HTML markup and from external config files.
Arguments
  • setting (string()) – A name that specifies a particular setting

  • value (any()) – The new value for the setting

  • attributes (Object()) – Additional constraints on the values of the setting Optional

  • persistent (boolean()) – Makes change persistent over multiple sessions (saves it to localStorage) Optional

Returns

void

getSettingKeys()
Returns a list of all setting keys.
Returns

Array<string> – An array which contains the names of all settings

readSetting(setting)
Returns the value of a setting.
Arguments
  • setting (string()) – The name of the setting that should be read

Returns

any – The value of the specified setting

readSettingAttributes(setting)
Returns the attribute object for the specified setting.
Arguments
  • setting (string()) – The name of the setting whose attribute(s) should be read

Returns

Object – The value of the attribute(s)

resetUserSettings()
Returns

void