mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 02:16:54 +00:00
3.5.409. Fix player positioning. Fix cheer rendering with hashtags. Add option to hide cheering with #charity notices. Fix highlight notices not appearing. Fix clicking a dashboard widget's settings balloon. Dark CSS fixes for dashboard and clips updates. Refactor CSS for chatlines to remove the need for :before. Fix debug logging never finishing when the client fails to get a logviewer token.
This commit is contained in:
parent
1b9b695bdd
commit
6b13ac3265
24 changed files with 286 additions and 344 deletions
|
@ -96,6 +96,16 @@ FFZ.settings_info.bits_pinned_expand = {
|
|||
}
|
||||
|
||||
|
||||
FFZ.settings_info.bits_disable_charity = {
|
||||
type: "boolean",
|
||||
value: false,
|
||||
|
||||
category: "Chat Filtering",
|
||||
name: "Disable Cheering with #Charity Notices",
|
||||
help: "Stop displaying Twitch's notices about Cheering with #Charity."
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --------------------
|
||||
// Initialization
|
||||
|
|
|
@ -38,7 +38,7 @@ FFZ.prototype.modify_dashboard_widget = function(component) {
|
|||
ffz_init: function() {
|
||||
var t = this;
|
||||
this.$(".dash-widget__header").click(function(e) {
|
||||
if ( ! f.settings.dash_widget_click_to_expand || e.target.tagName === 'button' || jQuery(e.target).parents('button').length )
|
||||
if ( ! f.settings.dash_widget_click_to_expand || e.target.tagName === 'button' || jQuery(e.target).parents('button').length || jQuery(e.target).parents('.balloon-wrapper').length )
|
||||
return;
|
||||
|
||||
t.actions.collapseWidget.call(t);
|
||||
|
|
|
@ -356,10 +356,9 @@ FFZ.settings_info.chat_rows = {
|
|||
help: "Display alternating background colors for lines in chat.",
|
||||
|
||||
on_update: function(val) {
|
||||
this.toggle_style('chat-background', !this.has_bttv && val);
|
||||
this._toggle_chat_setup_style();
|
||||
}
|
||||
};
|
||||
this.toggle_style('chat-background', !this.has_bttv && val);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
FFZ.settings_info.chat_separators = {
|
||||
|
@ -382,14 +381,12 @@ FFZ.settings_info.chat_separators = {
|
|||
help: "Display thin lines between chat messages for further visual separation.",
|
||||
|
||||
on_update: function(val) {
|
||||
this._toggle_chat_setup_style();
|
||||
|
||||
this.toggle_style('chat-separator', !this.has_bttv && val);
|
||||
this.toggle_style('chat-separator-3d', !this.has_bttv && val === 2);
|
||||
this.toggle_style('chat-separator-3d-inset', !this.has_bttv && val === 3);
|
||||
this.toggle_style('chat-separator-wide', !this.has_bttv && val === 4);
|
||||
}
|
||||
};
|
||||
this.toggle_style('chat-separator', !this.has_bttv && val);
|
||||
this.toggle_style('chat-separator-3d', !this.has_bttv && val === 2);
|
||||
this.toggle_style('chat-separator-3d-inset', !this.has_bttv && val === 3);
|
||||
this.toggle_style('chat-separator-wide', !this.has_bttv && val === 4);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
FFZ.settings_info.old_sub_notices = {
|
||||
|
@ -440,7 +437,7 @@ FFZ.settings_info.chat_padding = {
|
|||
help: "Reduce the amount of padding around chat messages to fit more on-screen at once.",
|
||||
|
||||
on_update: function(val) { this.toggle_style('chat-padding', !this.has_bttv && val); }
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
FFZ.settings_info.high_contrast_chat = {
|
||||
|
@ -666,7 +663,6 @@ FFZ.prototype.setup_line = function() {
|
|||
utils.toggle_cls('ffz-padded-emoticons')(!this.has_bttv && this.settings.emote_alignment === 1);
|
||||
utils.toggle_cls('ffz-baseline-emoticons')(!this.has_bttv && this.settings.emote_alignment === 2);
|
||||
|
||||
this._toggle_chat_setup_style();
|
||||
this.toggle_style('chat-padding', !this.has_bttv && this.settings.chat_padding);
|
||||
this.toggle_style('chat-background', !this.has_bttv && this.settings.chat_rows);
|
||||
|
||||
|
@ -692,15 +688,6 @@ FFZ.prototype.setup_line = function() {
|
|||
}
|
||||
|
||||
|
||||
FFZ.prototype._toggle_chat_setup_style = function() {
|
||||
this.toggle_style('chat-setup', !this.has_bttv && (
|
||||
this.settings.chat_mod_icon_visibility > 1 ||
|
||||
this.settings.chat_separators ||
|
||||
this.settings.chat_rows ||
|
||||
this.settings.highlight_messages_with_mod_card));
|
||||
}
|
||||
|
||||
|
||||
FFZ.prototype.save_aliases = function() {
|
||||
this.log("Saving " + Object.keys(this.aliases).length + " aliases to local storage.");
|
||||
localStorage.ffz_aliases = JSON.stringify(this.aliases);
|
||||
|
|
|
@ -80,7 +80,6 @@ FFZ.settings_info.highlight_messages_with_mod_card = {
|
|||
help: "Highlight a user's messages in chat when their moderation card is open.",
|
||||
|
||||
on_update: function(val) {
|
||||
this._toggle_chat_setup_style();
|
||||
if ( ! this._mod_card )
|
||||
return;
|
||||
|
||||
|
@ -128,7 +127,6 @@ FFZ.settings_info.chat_mod_icon_visibility = {
|
|||
help: "Choose when you should see in-line moderation icons in chat.",
|
||||
|
||||
on_update: function(val) {
|
||||
this._toggle_chat_setup_style();
|
||||
var settings = utils.ember_settings();
|
||||
if ( settings )
|
||||
settings.set('showModIcons', val === 1);
|
||||
|
@ -842,7 +840,7 @@ FFZ.prototype.modify_moderation_card = function(component) {
|
|||
var was_at_bottom = history.scrollTop >= (history.scrollHeight - history.clientHeight),
|
||||
last_line = history.querySelector('.chat-line:last-of-type'),
|
||||
ll_date = last_line && last_line.getAttribute('data-date'),
|
||||
date = message.date.toLocaleDateString();
|
||||
date = message.date && message.date.toLocaleDateString();
|
||||
|
||||
if ( last_line.classList.contains('no-messages') ) {
|
||||
last_line.parentElement.removeChild(last_line);
|
||||
|
@ -1559,7 +1557,7 @@ FFZ.prototype._build_mod_card_history = function(msg, modcard, show_from, ts_cli
|
|||
l_el.setAttribute('data-sender', msg.from);
|
||||
l_el.setAttribute('data-id', msg.tags && msg.tags.id);
|
||||
l_el.setAttribute('data-lv-id', msg.lv_id);
|
||||
l_el.setAttribute('data-date', msg.date.toLocaleDateString());
|
||||
l_el.setAttribute('data-date', msg.date && msg.date.toLocaleDateString());
|
||||
l_el.setAttribute('data-deleted', msg.deleted || false);
|
||||
|
||||
l_el.innerHTML = out.join("");
|
||||
|
|
|
@ -945,7 +945,7 @@ FFZ.prototype._update_room_badge_css = function(room_id) {
|
|||
output = [];
|
||||
|
||||
// For rooms that don't have sub badges set.
|
||||
if ( ! badges.subscriber ) {
|
||||
if ( badges && ! badges.subscriber ) {
|
||||
var BadgeService = utils.ember_lookup('service:badges'),
|
||||
global = BadgeService && BadgeService.badgeCollection && BadgeService.badgeCollection.global;
|
||||
badges.subscriber = global.subscriber;
|
||||
|
@ -2068,6 +2068,8 @@ FFZ.prototype._modify_room = function(room) {
|
|||
notice_type = msg.tags && msg.tags['msg-id'],
|
||||
is_whisper = msg.style === 'whisper';
|
||||
|
||||
if ( notice_type === 'charity' && f.settings.bits_disable_charity )
|
||||
return;
|
||||
|
||||
// If this message is already in the room, discard the duplicate.
|
||||
if ( msg_id && this.ffz_ids && this.ffz_ids[msg_id] )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue