mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-03 20:00:57 +00:00
4.17.1
* Changed: Update badge colors after Twitch fixed the colors of the new badges. * Fixed: Change the DOM output for emotes in chat to what BetterTTV expects to allow for basic compatibility with BetterTTV's modifier emotes for users not using the `BetterTTV Emotes` add-on but instead BetterTTV itself. * Removed: The unused `viewer_cards` and `logviewer` modules. Those are going to be moved into add-ons for further development. * API Added: `chat:user-click` event when a username is clicked in chat.
This commit is contained in:
parent
1fe7c417f3
commit
2803b211c5
10 changed files with 48 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "frankerfacez",
|
"name": "frankerfacez",
|
||||||
"author": "Dan Salvato LLC",
|
"author": "Dan Salvato LLC",
|
||||||
"version": "4.17.0",
|
"version": "4.17.1",
|
||||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -31,18 +31,18 @@ const CSS_BADGES = {
|
||||||
|
|
||||||
2: {
|
2: {
|
||||||
staff: { 1: { color: '#000' } },
|
staff: { 1: { color: '#000' } },
|
||||||
admin: { 1: { color: '#FFCA5F' } },
|
admin: { 1: { color: '#DB7600' } },
|
||||||
broadcaster: { 1: { color: '#E91916' } },
|
broadcaster: { 1: { color: '#E91916' } },
|
||||||
moderator: { 1: { color: '#00FA05' } },
|
moderator: { 1: { color: '#00AD03' } },
|
||||||
global_mod: { 1: { color: '#006441' } },
|
global_mod: { 1: { color: '#006441' } },
|
||||||
twitchbot: { 1: { color: '#00FA05' } },
|
twitchbot: { 1: { color: '#00AD03' } },
|
||||||
partner: { 1: { color: '#9146FF' } },
|
partner: { 1: { color: '#9146FF' } },
|
||||||
|
|
||||||
subscriber: { 0: { color: '#8205B4'}, 1: { color: '#8205B4' } },
|
subscriber: { 0: { color: '#8205B4'}, 1: { color: '#8205B4' } },
|
||||||
|
|
||||||
vip: { 1: { color: '#FA1ED2' } },
|
vip: { 1: { color: '#E005B9' } },
|
||||||
turbo: { 1: { color: '#59399A' } },
|
turbo: { 1: { color: '#59399A' } },
|
||||||
premium: { 1: { color: '#00A8E1' } },
|
premium: { 1: { color: '#00A0D6' } },
|
||||||
'anonymous-cheerer': { 1: { color: '#4B367C' } },
|
'anonymous-cheerer': { 1: { color: '#4B367C' } },
|
||||||
'clip-champ': { 1: { color: '#9146FF' } }
|
'clip-champ': { 1: { color: '#9146FF' } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -941,17 +941,18 @@ const render_emote = (token, createElement, wrapped) => {
|
||||||
if ( wrapped )
|
if ( wrapped )
|
||||||
return emote;
|
return emote;
|
||||||
|
|
||||||
return createElement('span', {
|
return createElement('div', {
|
||||||
|
className: 'ffz--inline',
|
||||||
attrs: {
|
attrs: {
|
||||||
'data-a-target': 'emote-name'
|
'data-test-selector': 'emote-button'
|
||||||
}
|
}
|
||||||
}, [emote]);
|
}, [emote]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return createElement('span', {
|
return createElement('div', {
|
||||||
class: `${EMOTE_CLASS} modified-emote`,
|
class: 'ffz--inline modified-emote',
|
||||||
attrs: {
|
attrs: {
|
||||||
'data-a-target': 'emote-name',
|
'data-test-selector': 'emote-button',
|
||||||
'data-provider': token.provider,
|
'data-provider': token.provider,
|
||||||
'data-id': token.id,
|
'data-id': token.id,
|
||||||
'data-set': token.set,
|
'data-set': token.set,
|
||||||
|
@ -994,12 +995,12 @@ export const AddonEmotes = {
|
||||||
if ( wrapped )
|
if ( wrapped )
|
||||||
return emote;
|
return emote;
|
||||||
|
|
||||||
return (<span data-a-target="emote-name">{emote}</span>);
|
return (<div class="ffz--inline" data-test-selector="emote-button">{emote}</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (<span
|
return (<div
|
||||||
class={`${EMOTE_CLASS} modified-emote`}
|
class="ffz--inline modified-emote"
|
||||||
data-a-target="emote-name"
|
data-test-selector="emote-button"
|
||||||
data-provider={token.provider}
|
data-provider={token.provider}
|
||||||
data-id={token.id}
|
data-id={token.id}
|
||||||
data-set={token.set}
|
data-set={token.set}
|
||||||
|
@ -1008,7 +1009,7 @@ export const AddonEmotes = {
|
||||||
>
|
>
|
||||||
{emote}
|
{emote}
|
||||||
{mods.map(t => <span key={t.text}>{this.tokenizers.emote.render.call(this, t, createElement, true)}</span>)}
|
{mods.map(t => <span key={t.text}>{this.tokenizers.emote.render.call(this, t, createElement, true)}</span>)}
|
||||||
</span>);
|
</div>);
|
||||||
},
|
},
|
||||||
|
|
||||||
async tooltip(target, tip) {
|
async tooltip(target, tip) {
|
||||||
|
|
|
@ -10,7 +10,8 @@ import Module from 'utilities/module';
|
||||||
import RichContent from './rich_content';
|
import RichContent from './rich_content';
|
||||||
import { has } from 'utilities/object';
|
import { has } from 'utilities/object';
|
||||||
import { KEYS } from 'utilities/constants';
|
import { KEYS } from 'utilities/constants';
|
||||||
import { print_duration } from 'src/utilities/time';
|
import { print_duration } from 'utilities/time';
|
||||||
|
import { FFZEvent } from 'utilities/events';
|
||||||
import { getRewardTitle, getRewardCost, isHighlightedReward } from './points';
|
import { getRewardTitle, getRewardCost, isHighlightedReward } from './points';
|
||||||
|
|
||||||
const SUB_TIERS = {
|
const SUB_TIERS = {
|
||||||
|
@ -31,8 +32,6 @@ export default class ChatLine extends Module {
|
||||||
this.inject('site.web_munch');
|
this.inject('site.web_munch');
|
||||||
this.inject(RichContent);
|
this.inject(RichContent);
|
||||||
|
|
||||||
this.inject('viewer_cards');
|
|
||||||
|
|
||||||
this.inject('chat.actions');
|
this.inject('chat.actions');
|
||||||
|
|
||||||
this.ChatLine = this.fine.define(
|
this.ChatLine = this.fine.define(
|
||||||
|
@ -404,10 +403,20 @@ other {# messages were deleted by a moderator.}
|
||||||
} catch(err) { /* nothing~! */ }
|
} catch(err) { /* nothing~! */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if ( event.ctrlKey )
|
const fe = new FFZEvent({
|
||||||
t.viewer_cards.openCard(r, target_user, msg, event);
|
inst: this,
|
||||||
else*/
|
event,
|
||||||
this.props.onUsernameClick(target_user.login, 'chat_message', msg.id, target.getBoundingClientRect().bottom);
|
message: msg,
|
||||||
|
user: target_user,
|
||||||
|
room: r
|
||||||
|
});
|
||||||
|
|
||||||
|
t.emit('chat:user-click', fe);
|
||||||
|
|
||||||
|
if ( fe.defaultPrevented )
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.props.onUsernameClick(target_user.login, 'chat_message', msg.id, target.getBoundingClientRect().bottom);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this.ffz_user_click_handler = this.openViewerCard || this.usernameClickHandler; //event => event.ctrlKey ? this.usernameClickHandler(event) : t.viewer_cards.openCard(r, user, event);
|
this.ffz_user_click_handler = this.openViewerCard || this.usernameClickHandler; //event => event.ctrlKey ? this.usernameClickHandler(event) : t.viewer_cards.openCard(r, user, event);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
.message > span > .chat-line__message--emote {
|
.message > div > .chat-line__message--emote {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message > span > .chat-line__message--emote.ffz-emoji {
|
.message > div > .chat-line__message--emote.ffz-emoji {
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
.message > span > .chat-line__message--emote {
|
.message > div > .chat-line__message--emote {
|
||||||
margin: -1px 0 0;
|
margin: -1px 0 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
.side-nav {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-nav--hover-exp~.twilight-main {
|
||||||
|
margin-left: 0 !important;
|
||||||
|
}
|
|
@ -146,6 +146,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ffz--inline {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.ffz--giftee-name {
|
.ffz--giftee-name {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue