1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-10 16:10:55 +00:00
* Added: New UI for clearing FrankerFaceZ settings (Data Management > Storage).
* Fixed: Do not display duplicate bot badges in tool-tips when a bot has both a global bot badge and a channel-specific bot badge.
* Fixed: Do not add click URLs for FFZ badges to add-on badges.
* Fixed: Remove `debugger;` from automatic error reporting method.
* Fixed: IndexedDBProvider not synchronizing settings correctly.
* Fixed: Change a CSS class name used when changing emote visibility to avoid bad UX due to misbehaving third-party extensions.
* Fixed: Color calculations for chat messages, including highlight colors. (Closes #947)
* Changed: Use rounded images from the CDN for FFZ badges in tool-tips.
* Changed: Use Twitch IDs rather than usernames for assigning channel-specific badges to users.
* API Added: `settings.addClearable(key, definition)` for adding new UI to `Data Management > Storage >> Clear`.
This commit is contained in:
SirStendec 2020-12-01 18:19:17 -05:00
parent 7adee6556c
commit ef4ff0c13a
15 changed files with 394 additions and 27 deletions

View file

@ -493,8 +493,6 @@ export default class Badges extends Module {
}
}
this.log.info('badge-click', event.target);
if ( url ) {
const link = createElement('a', {
target: '_blank',
@ -586,8 +584,15 @@ export default class Badges extends Module {
};
}
const handled_ids = new Set;
for(const badge of badges)
if ( badge && badge.id != null ) {
if ( handled_ids.has(badge.id) )
continue;
handled_ids.add(badge.id);
const full_badge = this.badges[badge.id] || {},
is_hidden = hidden_badges[badge.id];
@ -609,6 +614,12 @@ export default class Badges extends Module {
title: badge.title || full_badge.title
};
// Hacky nonsense.
if ( ! full_badge.addon ) {
bd.image = `//cdn.frankerfacez.com/badge/${badge.id}/4/rounded`;
bd.color = null;
}
let style;
if ( old_badge ) {
@ -821,7 +832,7 @@ export default class Badges extends Module {
data.replaces = true;
}
if ( data.name === 'developer' || data.name === 'supporter' )
if ( ! data.addon && (data.name === 'developer' || data.name === 'supporter') )
data.click_url = 'https://www.frankerfacez.com/donate';
if ( generate_css )