1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 10:16:57 +00:00

3.5.374. Fixed clicking usernames in ban notices. Add no_tooltip attribute for badges. Add sort attribute to emote sets for the My Emoticons menu. Add source_line attribute to emote sets for customizing tooltips. Add chat-view-init and chat-view-destroy events to the API.

This commit is contained in:
SirStendec 2016-11-20 13:43:12 -05:00
parent cc5aec5591
commit 9345237327
10 changed files with 83 additions and 41 deletions

View file

@ -554,18 +554,18 @@ FFZ.prototype.modify_channel_redesign = function(view) {
handleScroll: function(top) {
this._super();
var height = this.get('channelCoverHeight') + Layout.get('fullSizePlayerDimensions.height');
var height = this.channelCoverHeight + Layout.get('fullSizePlayerDimensions.height');
document.body.classList.toggle('ffz-small-player', f.settings.small_player && top >= (height * .8));
},
ffzUpdateCoverHeight: function() {
var old_height = this.get('channelCoverHeight'),
var old_height = this.channelCoverHeight,
setting = f.settings.hide_channel_banner,
banner_hidden = setting === 1 ? f.settings.channel_bar_bottom : setting > 0,
new_height = banner_hidden ? 0 : 380;
this.set('channelCoverHeight', new_height);
this.channelCoverHeight = new_height;
this.$("#channel").toggleClass('ffz-bar-fixed', this.get('isFixed'));
if ( old_height !== new_height )

View file

@ -575,6 +575,8 @@ FFZ.prototype.modify_chat_room_manager = function(component) {
this.ffz_pruner = setInterval(this.ffzPruneTabs.bind(this), 10000);
f.api_trigger('chat-view-init', el, this);
setTimeout(function() {
if ( f.settings.group_tabs && t._ffz_tabs )
t.$('.chat-room').css('top', t._ffz_tabs.offsetHeight + "px");
@ -599,6 +601,8 @@ FFZ.prototype.modify_chat_room_manager = function(component) {
this.ffzTeardownMenu();
this.ffzUnloadHost();
f.api_trigger('chat-view-destroy', this.get('element'), this);
},

View file

@ -1143,9 +1143,6 @@ FFZ.prototype._modify_chat_subline = function(component) {
var cl = e.target.classList,
from = this.get("msgObject.from");
if ( ! from )
return;
/*if ( cl.contains('ffz-old-messages') )
return f._show_deleted(this.get('msgObject.room'));*/
@ -1157,6 +1154,7 @@ FFZ.prototype._modify_chat_subline = function(component) {
return f._deleted_link_click.call(e.target, e);
else if ( cl.contains('mod-icon') ) {
jQuery(e.target).trigger('mouseout');
e.preventDefault();
@ -1172,6 +1170,9 @@ FFZ.prototype._modify_chat_subline = function(component) {
else if ( cl.contains('tb-allow') )
this.actions.clickedTwitchBotResponse.call(this, this.get('msgObject.tags.id'), 'yes');
else if ( ! from )
return;
else if ( cl.contains('ban') )
this.sendAction("banUser", {user:from});
@ -1223,6 +1224,9 @@ FFZ.prototype._modify_chat_subline = function(component) {
from :
this.get('msgObject.to');
if ( ! target )
return;
var n = this.get('element'),
bounds = n && n.getBoundingClientRect() || document.body.getBoundingClientRect(),
x = 0, right;