Options

Options~ Options

Options handling class allowing getting and settings extension global and module special options and provides options depended helpers functions.

Constructor

new Options(optsnon-null, moduleNamenon-null)

Create Options instance using the background sent options for global extension and for the specified module.

Source:
Parameters:
Name Type Description
opts Object

Options object recived from the background script.

moduleName string

Module unique name.

Methods

get(optnon-null) → {any}

Get the option value.

Source:
Parameters:
Name Type Description
opt string

Option name.

Returns:
Type:
any

Option value.

get(optnon-null) → {any}

Get the option value.

Source:
Parameters:
Name Type Description
opt string

Option name.

Returns:
Type:
any

Option value.

getAll() → {Object.<string, any>}

Get all available options values.

Source:
Returns:
Type:
Object.<string, any>

Options object.

getAll() → {Object.<string, any>}

Get all available options values.

Source:
Returns:
Type:
Object.<string, any>

Options object.

getId() → {string}

Get installed extension id string defined on manifest.json file.

Source:
Returns:
Type:
string

Extension id string.

getId() → {string}

Get installed extension id string defined on manifest.json file.

Source:
Returns:
Type:
string

Extension id string.

getLang() → {string}

Get user selected track language to download and show.

Source:
Returns:
Type:
string

Track language if any selected by user else undefined.

getLang() → {string}

Get user selected track language to download and show.

Source:
Returns:
Type:
string

Track language if any selected by user else undefined.

getPreload(autonullable) → {string}

Get video preload property value. It return user selected option value else module default value (passed as argument) if the user seleced "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default preload value.

Returns:
Type:
string

Video preload property value.

getPreload(autonullable) → {string}

Get video preload property value. It return user selected option value else module default value (passed as argument) if the user seleced "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default preload value.

Returns:
Type:
string

Video preload property value.

getVersion() → {string}

Get installed extension version.

Source:
Returns:
Type:
string

Extension current version.

getVersion() → {string}

Get installed extension version.

Source:
Returns:
Type:
string

Extension current version.

getVolume() → {float}

Get volume value.

Source:
Returns:
Type:
float

Volume value.

getVolume() → {float}

Get volume value.

Source:
Returns:
Type:
float

Volume value.

isAutoPlay(autonullable) → {boolean}

Get video autoplay property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default autoplay value.

Returns:
Type:
boolean

Video autoplay property value.

isAutoPlay(autonullable) → {boolean}

Get video autoplay property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default autoplay value.

Returns:
Type:
boolean

Video autoplay property value.

isDisabled() → {boolean}

Check if the current module is disabled (by user on options page).

Source:
Returns:
Type:
boolean

Is the module disabled.

isDisabled() → {boolean}

Check if the current module is disabled (by user on options page).

Source:
Returns:
Type:
boolean

Is the module disabled.

isLoop(lpnullable) → {boolean}

Get video loop property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
lp boolean <nullable>
false

Module default loop value.

Returns:
Type:
boolean

Video loop property value.

isLoop(lpnullable) → {boolean}

Get video loop property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
lp boolean <nullable>
false

Module default loop value.

Returns:
Type:
boolean

Video loop property value.

set(optnon-null, val)

Set option value. It sets local value and notify the background script of the new value.

Source:
Parameters:
Name Type Description
opt string

Option name.

val any

Option value.

set(optnon-null, val)

Set option value. It sets local value and notify the background script of the new value.

Source:
Parameters:
Name Type Description
opt string

Option name.

val any

Option value.

Options~ Options

Options handling class allowing getting and settings extension global and module special options and provides options depended helpers functions.

Constructor

new Options(optsnon-null, moduleNamenon-null)

Create Options instance using the background sent options for global extension and for the specified module.

Source:
Parameters:
Name Type Description
opts Object

Options object recived from the background script.

moduleName string

Module unique name.

Methods

get(optnon-null) → {any}

Get the option value.

Source:
Parameters:
Name Type Description
opt string

Option name.

Returns:
Type:
any

Option value.

get(optnon-null) → {any}

Get the option value.

Source:
Parameters:
Name Type Description
opt string

Option name.

Returns:
Type:
any

Option value.

getAll() → {Object.<string, any>}

Get all available options values.

Source:
Returns:
Type:
Object.<string, any>

Options object.

getAll() → {Object.<string, any>}

Get all available options values.

Source:
Returns:
Type:
Object.<string, any>

Options object.

getId() → {string}

Get installed extension id string defined on manifest.json file.

Source:
Returns:
Type:
string

Extension id string.

getId() → {string}

Get installed extension id string defined on manifest.json file.

Source:
Returns:
Type:
string

Extension id string.

getLang() → {string}

Get user selected track language to download and show.

Source:
Returns:
Type:
string

Track language if any selected by user else undefined.

getLang() → {string}

Get user selected track language to download and show.

Source:
Returns:
Type:
string

Track language if any selected by user else undefined.

getPreload(autonullable) → {string}

Get video preload property value. It return user selected option value else module default value (passed as argument) if the user seleced "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default preload value.

Returns:
Type:
string

Video preload property value.

getPreload(autonullable) → {string}

Get video preload property value. It return user selected option value else module default value (passed as argument) if the user seleced "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default preload value.

Returns:
Type:
string

Video preload property value.

getVersion() → {string}

Get installed extension version.

Source:
Returns:
Type:
string

Extension current version.

getVersion() → {string}

Get installed extension version.

Source:
Returns:
Type:
string

Extension current version.

getVolume() → {float}

Get volume value.

Source:
Returns:
Type:
float

Volume value.

getVolume() → {float}

Get volume value.

Source:
Returns:
Type:
float

Volume value.

isAutoPlay(autonullable) → {boolean}

Get video autoplay property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default autoplay value.

Returns:
Type:
boolean

Video autoplay property value.

isAutoPlay(autonullable) → {boolean}

Get video autoplay property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
auto boolean <nullable>
false

Module default autoplay value.

Returns:
Type:
boolean

Video autoplay property value.

isDisabled() → {boolean}

Check if the current module is disabled (by user on options page).

Source:
Returns:
Type:
boolean

Is the module disabled.

isDisabled() → {boolean}

Check if the current module is disabled (by user on options page).

Source:
Returns:
Type:
boolean

Is the module disabled.

isLoop(lpnullable) → {boolean}

Get video loop property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
lp boolean <nullable>
false

Module default loop value.

Returns:
Type:
boolean

Video loop property value.

isLoop(lpnullable) → {boolean}

Get video loop property value. It returns user selected option value else module default value (passed as argument) if the user selected "default" option value.

Source:
Parameters:
Name Type Attributes Default Description
lp boolean <nullable>
false

Module default loop value.

Returns:
Type:
boolean

Video loop property value.

set(optnon-null, val)

Set option value. It sets local value and notify the background script of the new value.

Source:
Parameters:
Name Type Description
opt string

Option name.

val any

Option value.

set(optnon-null, val)

Set option value. It sets local value and notify the background script of the new value.

Source:
Parameters:
Name Type Description
opt string

Option name.

val any

Option value.