1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 01:56:55 +00:00

3.5.425. Fix whisper button visibility on mod cards. Fix log message colors. Reduce logging when not running a development build. Fix ban notices rendering HTML.

This commit is contained in:
SirStendec 2017-02-03 02:01:18 -05:00
parent b84bd1d4a2
commit 87e7a7fb29
9 changed files with 39 additions and 22 deletions

View file

@ -1534,7 +1534,8 @@ FFZ.prototype._build_mod_card_history = function(msg, modcard, show_from, ts_cli
colored = '';
}
var tokens = this.tokenize_chat_line(msg, true, false, true),
// Use cached tokens on the off chance we have them, but don't count on them.
var tokens = msg.cachedTokens || this.tokenize_chat_line(msg, true, false, true),
message = '<span class="message' + colored + '" style="' + style + (colors ? '" data-color="' + raw_color : '') + '">' +
(msg.style === 'action' && ! show_from ? '*' + name + ' ' : '') + this.render_tokens(tokens, true, false, msg.tags && msg.tags.bits) + '</span>';

View file

@ -1479,11 +1479,11 @@ FFZ.prototype._modify_room = function(room) {
if ( show_notice )
this.addMessage(message);
this.addUserHistory(message);
this.addUserHistory(message, true);
}
},
addUserHistory: function(message) {
addUserHistory: function(message, dont_copy) {
var room_id = this.get('id'),
is_group = this.get('isGroupRoom'),
setting = f.settings.mod_card_history,
@ -1514,6 +1514,9 @@ FFZ.prototype._modify_room = function(room) {
}
};
if ( dont_copy )
cache_object = message;
if ( historical ) {
if ( user_history.length >= 20 )
return;

View file

@ -63,7 +63,8 @@ FFZ.prototype._update_views = function(klasses) {
try {
klasses[i][1].create().destroy()
} catch(err) {
this.log("There was an error creating and destroying an instance of the Ember class \"" + klasses[i][0] + "\" to clear its cache.", err);
if ( constants.DEBUG )
this.log("There was an error creating and destroying an instance of the Ember class \"" + klasses[i][0] + "\" to clear its cache.", err);
}
}