mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 02:16:54 +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
|
@ -10,7 +10,8 @@ import Module from 'utilities/module';
|
|||
import RichContent from './rich_content';
|
||||
import { has } from 'utilities/object';
|
||||
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';
|
||||
|
||||
const SUB_TIERS = {
|
||||
|
@ -31,8 +32,6 @@ export default class ChatLine extends Module {
|
|||
this.inject('site.web_munch');
|
||||
this.inject(RichContent);
|
||||
|
||||
this.inject('viewer_cards');
|
||||
|
||||
this.inject('chat.actions');
|
||||
|
||||
this.ChatLine = this.fine.define(
|
||||
|
@ -404,10 +403,20 @@ other {# messages were deleted by a moderator.}
|
|||
} catch(err) { /* nothing~! */ }
|
||||
}
|
||||
|
||||
/*if ( event.ctrlKey )
|
||||
t.viewer_cards.openCard(r, target_user, msg, event);
|
||||
else*/
|
||||
this.props.onUsernameClick(target_user.login, 'chat_message', msg.id, target.getBoundingClientRect().bottom);
|
||||
const fe = new FFZEvent({
|
||||
inst: this,
|
||||
event,
|
||||
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
|
||||
this.ffz_user_click_handler = this.openViewerCard || this.usernameClickHandler; //event => event.ctrlKey ? this.usernameClickHandler(event) : t.viewer_cards.openCard(r, user, event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue