Class

ToolSettings

ToolSettings(tool)

Constructor

new ToolSettings(tool)

This module manages a few settings and gives you easy functions to store your settings in the localStorage.
Parameters:
Name Type Description
tool TTVTool

View Source mod/settings.js, line 12

Members

Boolean

readonly autoRecoverMessages

Loads and returns weither or not to auto recover deleted messages.

View Source mod/settings.js, line 275

Boolean

readonly colorlessNames

Loads and returns weither or not to show user colors.

View Source mod/settings.js, line 264

Boolean

readonly displayChatToTop

Loads and returns weither or not to display to-top-chat.

View Source mod/settings.js, line 297

Boolean

readonly displayClassicChat

Loads and returns weither or not to display chat in a classic look.

View Source mod/settings.js, line 286

Boolean

readonly displayEmbedChat

Loads and returns weither or not to embed twitch chat.

View Source mod/settings.js, line 308

Boolean

readonly flashActions

Loads and returns weither or not to animate actions in the action bar

View Source mod/settings.js, line 319

Array

readonly highlights

Loads and returns an array of configured highlight objects.

View Source mod/settings.js, line 434

String

readonly language

Loads and returns the selected application language.

View Source mod/settings.js, line 241

Boolean

readonly lightDesignMode

Loads and returns weither or not to invert the application's colors

View Source mod/settings.js, line 444

MenuItem
Creates and returns a settings menu. This always creates a new MenuItem. If you want access to the items in the application menu use getMenuItemById of the ToolUI.

View Source mod/settings.js, line 474

Boolean

readonly showActionStream

Loads and returns weither or not to show the action stream

View Source mod/settings.js, line 412

Boolean

readonly showBanAlert

Loads and returns weither or not to show ban alerts

View Source mod/settings.js, line 370

Boolean

readonly showCheerAlert

Loads and returns weither or not to show cheer alerts

View Source mod/settings.js, line 390

Boolean

readonly showFollowAlert

Loads and returns weither or not to show follow alerts

View Source mod/settings.js, line 330

Boolean

readonly showHostAlert

Loads and returns weither or not to show host alerts

View Source mod/settings.js, line 360

Boolean

readonly showLocalizedNames

Loads and returns weither or not localized names should be displayed.

View Source mod/settings.js, line 253

Boolean

readonly showRaidAlert

Loads and returns weither or not to show raid alerts

View Source mod/settings.js, line 350

Boolean

readonly showSubscriptionAlert

Loads and returns weither or not to show subscription alerts

View Source mod/settings.js, line 340

Boolean

readonly showTimeoutAlert

Loads and returns weither or not to show timeout alerts

View Source mod/settings.js, line 380

Boolean

readonly showViewerList

Loads and returns weither or not to show the viewers list

View Source mod/settings.js, line 401

Boolean

readonly showViewersAmount

Loads and returns weither or not to show the amount of viewers

View Source mod/settings.js, line 423

Methods

addHighlight()

Opens the dialog to add a new highlight.

View Source mod/settings.js, line 638

appendSetting(setting, label, type, options)

Parameters:
Name Type Description
setting String
label String
type String
options Object

View Source mod/settings.js, line 188

getBoolean(name, defaultValue)

Load a boolean from the localStorage.
Parameters:
Name Type Description
name String Name of the localStorage value
defaultValue Boolean The default value you want returned if storage value was not found

View Source mod/settings.js, line 1053

getJSON(name, defaultValue)

Gets a object from the localStorage.
Parameters:
Name Type Description
name String Name of the localStorage value
defaultValue Object The default value you want returned if storage value was not found

View Source mod/settings.js, line 1108

getString(name, defaultValue)

Gets a string from the localStorage.
Parameters:
Name Type Description
name String Name of the localStorage value
defaultValue String The default value you want returned if storage value was not found

View Source mod/settings.js, line 1082

remove(name)

Removes an item in the localStorage
Parameters:
Name Type Description
name String

View Source mod/settings.js, line 1136

setBoolean(name, value)

Sets a boolean to the localStorage.
Parameters:
Name Type Description
name String Name of the localStorage value
value Boolean The value you want to set

View Source mod/settings.js, line 1072

setJSON(name, value)

Sets a JSON object to the localStorage.
Parameters:
Name Type Description
name String Name of the localStorage value
value Object The value you want to set

View Source mod/settings.js, line 1125

setLanguage(lang)

Sets the application language to lang. Please don't use this without explicit user interaction.
Parameters:
Name Type Description
lang String The short i18n languge description. Currently only en and de are really supported.

View Source mod/settings.js, line 629

setString(name, value)

Sets a string to the localStroage.
Parameters:
Name Type Description
name String Name of the localStorage value
value String The value you want to set

View Source mod/settings.js, line 1098