Methods
(async, inner) buildThemes() → {Promise.<void>}
Accesses all installed themes and organizes them categorically.
- Source:
Returns:
- Type
- Promise.<void>
(async, inner) buildThemes() → {Promise.<void>}
Accesses all installed themes and organizes them categorically.
- Source:
Returns:
- Type
- Promise.<void>
(async, inner) chooseNext(currentIndex, items) → {Promise.<number>}
Calculates the next theme index based on user preferences (random or sequential).
Parameters:
| Name | Type | Description |
|---|---|---|
currentIndex |
number | The index of the currently active theme. |
items |
Object | Object containing userThemes array. |
- Source:
Returns:
The index of the next theme to enable.
- Type
- Promise.<number>
(async, inner) chooseNext(currentIndex, items) → {Promise.<number>}
Calculates the next theme index based on user preferences (random or sequential).
Parameters:
| Name | Type | Description |
|---|---|---|
currentIndex |
number | The index of the currently active theme. |
items |
Object | Object containing userThemes array. |
- Source:
Returns:
The index of the next theme to enable.
- Type
- Promise.<number>
(inner) getCurrentId(localThemeId, userThemes, defaultTheme) → {string}
Returns the ID of current theme
Parameters:
| Name | Type | Description |
|---|---|---|
localThemeId |
Object | User's current theme id, assuming it exists |
userThemes |
Array.<Object> | Array of non-default, user-added themes |
defaultTheme |
Object | Default Mozilla/Firefox theme |
- Source:
Returns:
currentId
- Type
- string
(inner) getCurrentId(localThemeId, userThemes, defaultTheme) → {string}
Returns the ID of current theme
Parameters:
| Name | Type | Description |
|---|---|---|
localThemeId |
Object | User's current theme id, assuming it exists |
userThemes |
Array.<Object> | Array of non-default, user-added themes |
defaultTheme |
Object | Default Mozilla/Firefox theme |
- Source:
Returns:
currentId
- Type
- string
(inner) getDefaultTheme(allThemes) → {Object}
Takes in an array of all themes installed.
Gets a default Mozilla. Logs to console if no default theme found.
Parameters:
| Name | Type | Description |
|---|---|---|
allThemes |
Array.<Object> | the list of all installed themes |
- Source:
Returns:
The default theme of the user
- Type
- Object
(inner) getDefaultTheme(allThemes) → {Object}
Takes in an array of all themes installed.
Gets a default Mozilla. Logs to console if no default theme found.
Parameters:
| Name | Type | Description |
|---|---|---|
allThemes |
Array.<Object> | the list of all installed themes |
- Source:
Returns:
The default theme of the user
- Type
- Object
(inner) isDefaultTheme(theme) → {boolean}
Determines if a given theme is a built-in Mozilla or Firefox theme.
Parameters:
| Name | Type | Description |
|---|---|---|
theme |
Object | The theme object to check. |
- Source:
Returns:
True if it is a default theme, false otherwise.
- Type
- boolean
(inner) isDefaultTheme(theme) → {boolean}
Determines if a given theme is a built-in Mozilla or Firefox theme.
Parameters:
| Name | Type | Description |
|---|---|---|
theme |
Object | The theme object to check. |
- Source:
Returns:
True if it is a default theme, false otherwise.
- Type
- boolean
(inner) isMozillaTheme(theme) → {Boolean}
Determines if a theme is a theme from Mozilla.
Parameters:
| Name | Type | Description |
|---|---|---|
theme |
Object | Theme to be tested. |
- Source:
Returns:
True if Mozilla theme, false if not a Mozilla theme.
- Type
- Boolean
(inner) isMozillaTheme(theme) → {Boolean}
Determines if a theme is a theme from Mozilla.
Parameters:
| Name | Type | Description |
|---|---|---|
theme |
Object | Theme to be tested. |
- Source:
Returns:
True if Mozilla theme, false if not a Mozilla theme.
- Type
- Boolean
(async, inner) rotate() → {Promise.<void>}
Rotates to the next theme in user's collection.
- Source:
Returns:
- Type
- Promise.<void>
(async, inner) rotate() → {Promise.<void>}
Rotates to the next theme in user's collection.
- Source:
Returns:
- Type
- Promise.<void>
(async, inner) startRotation()
Begins the process for rotating through themes on a timer.
- Source:
(async, inner) startRotation()
Begins the process for rotating through themes on a timer.
- Source:
(async, inner) stopRotation()
Stops the process of rotating through themes.
- Source:
(async, inner) stopRotation()
Stops the process of rotating through themes.
- Source: