mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-24 19:48:30 +00:00
4.20.15
* Changed: Implemented FFZ rendering of Channel Points redemption notices with no associated messages. (Experiment, 50% roll-out) * Fixed: Channel not properly detecting the current channel's branding color. * Fixed: Unable to delete the profile 0 (Default Profile) * Fixed: Twitch prevented viewer cards from appearing when moved out of the chat area. * Fixed: `addons` should not block loading while its data loads. * Fixed: Issue accessing `i18n` before `settings` has fully loaded. * Fixed: `main_menu` tries to use `i18n` before `i18n` is ready. * Fixed: Main menu throws error if profiles are changed while main menu is open. * Fixed: `site` should not block loading waiting for `settings` * Maintenance: Updated dependencies. * API Added: Initial support for using IndexedDB to store settings rather than localStorage * API Added: Messages now have a `highlights` object if they've matched filters, describing which filters they matched.
This commit is contained in:
parent
65a00df2a9
commit
1c2bf202fc
18 changed files with 478 additions and 244 deletions
|
@ -277,8 +277,10 @@ export const Mentions = {
|
|||
recipient: recipient ? recipient.toLowerCase() : ''
|
||||
});
|
||||
|
||||
if ( mentioned )
|
||||
if ( mentioned ) {
|
||||
(msg.highlights = (msg.highlights || new Set())).add('mention');
|
||||
msg.mentioned = true;
|
||||
}
|
||||
|
||||
// Push the remaining text from the token.
|
||||
text.push(segment.substr(match[0].length));
|
||||
|
@ -315,6 +317,7 @@ export const UserHighlights = {
|
|||
const u = msg.user;
|
||||
for(const [color, regex] of colors) {
|
||||
if ( regex.test(u.login) || regex.test(u.displayName) ) {
|
||||
(msg.highlights = (msg.highlights || new Set())).add('user');
|
||||
msg.mentioned = true;
|
||||
if ( color ) {
|
||||
msg.mention_color = color;
|
||||
|
@ -371,6 +374,7 @@ export const BadgeHighlights = {
|
|||
for(const badge of Object.keys(badges)) {
|
||||
if ( colors.has(badge) ) {
|
||||
const color = colors.get(badge);
|
||||
(msg.highlights = (msg.highlights || new Set())).add('badge');
|
||||
msg.mentioned = true;
|
||||
if ( color ) {
|
||||
msg.mention_color = color;
|
||||
|
@ -454,6 +458,7 @@ export const CustomHighlights = {
|
|||
if ( idx !== nix )
|
||||
out.push({type: 'text', text: text.slice(idx, nix)});
|
||||
|
||||
(msg.highlights = (msg.highlights || new Set())).add('term');
|
||||
msg.mentioned = true;
|
||||
msg.mention_color = color || msg.mention_color;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue