1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 16:38:31 +00:00
* Added: Support for custom VIP Badge images.
* Fixed: Certain emotes breaking when `Large Emotes` is combined with `Fix bad Twitch emotes`. (Closes #1020)
* Fixed: Remember the Compressor state, if it was toggled, when resetting the player. (Closes #1024)
* API Added: The `chat` module has two methods for maintaining a list of possible message highlight reasons, for use populating UI. Accessible via methods `addHighlightReason(key, data)` and `getHighlightReasons()`.
* API Added: `basic_array_merge` setting type.
* API Added: Logs now include the initial URL that the script was loaded into.
* API Changed: `<select>` settings can now support multiple selected values.
This commit is contained in:
SirStendec 2021-04-14 16:53:15 -04:00
parent ae90b8e4fe
commit a80728a10d
13 changed files with 183 additions and 28 deletions

View file

@ -44,6 +44,33 @@ export const object_merge = {
}
export const basic_array_merge = {
get(key, profiles, log) {
const values = [],
sources = [];
for(const profile of profiles)
if ( profile.has(key) ) {
const val = profile.get(key);
if ( ! Array.isArray(val) ) {
log.warn(`Profile #${profile.id} has an invalid value for "${key}"`);
continue;
}
sources.push(profile.id);
for(const v of val)
values.push(v);
}
if ( sources.length )
return [
values,
sources
]
}
}
export const array_merge = {
default(val) {
const values = [];