mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-03 11:50:56 +00:00
4.67.1
* API Fixed: The new changes to `addNotice()` were not correctly displaying add-on emotes from the current channel.
This commit is contained in:
parent
8688d1a41b
commit
e8bb25f982
3 changed files with 26 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.67.0",
|
"version": "4.67.1",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
@ -57,9 +57,24 @@ export default class ChatLine extends Module {
|
||||||
if ( typeof content === 'string' )
|
if ( typeof content === 'string' )
|
||||||
content = e('span', {}, content);
|
content = e('span', {}, content);
|
||||||
|
|
||||||
content.ffz_icon = e('span', {
|
if ( typeof data.icon === 'function' ) {
|
||||||
className: `${data.icon} tw-mg-r-05`
|
try {
|
||||||
});
|
content.ffz_icon = data.icon(data, inst, e);
|
||||||
|
} catch(err) {
|
||||||
|
this.log.capture(err);
|
||||||
|
this.log.error('Error using custom renderer for notice:', err);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ( data.icon instanceof URL )
|
||||||
|
content.ffz_icon = e('img', {
|
||||||
|
className: 'ffz-notice-icon tw-mg-r-05',
|
||||||
|
src: data.icon.toString()
|
||||||
|
});
|
||||||
|
|
||||||
|
else
|
||||||
|
content.ffz_icon = e('span', {
|
||||||
|
className: `${data.icon} tw-mg-r-05`
|
||||||
|
});
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
},
|
},
|
||||||
|
@ -95,8 +110,10 @@ export default class ChatLine extends Module {
|
||||||
const tokens = data.ffz_tokens = data.ffz_tokens || this.chat.tokenizeMessage({
|
const tokens = data.ffz_tokens = data.ffz_tokens || this.chat.tokenizeMessage({
|
||||||
message: text,
|
message: text,
|
||||||
id: msg.id,
|
id: msg.id,
|
||||||
user: msg.user
|
user: msg.user,
|
||||||
}, current_user);
|
room: msg.room,
|
||||||
|
roomID: msg.roomID
|
||||||
|
});
|
||||||
|
|
||||||
return this.chat.renderTokens(tokens, e);
|
return this.chat.renderTokens(tokens, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,11 +158,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ffz-notice-icon,
|
||||||
.ffz-emoji {
|
.ffz-emoji {
|
||||||
width: 1.8rem; height: 1.8rem;
|
width: 1.8rem; height: 1.8rem;
|
||||||
width: calc(var(--ffz-chat-font-size) * 1.5);
|
width: calc(var(--ffz-chat-font-size) * 1.5);
|
||||||
height: calc(var(--ffz-chat-font-size) * 1.5);
|
height: calc(var(--ffz-chat-font-size) * 1.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ffz-emoji {
|
||||||
&.preview-image {
|
&.preview-image {
|
||||||
width: 7.2rem;
|
width: 7.2rem;
|
||||||
height: 7.2rem;
|
height: 7.2rem;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue