1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

3.5.370. Add temporary setting to remove messages containing banned words. Fix sidebar link color with FFZ's dark theme.

This commit is contained in:
SirStendec 2016-11-13 14:37:19 -05:00
parent 35b0665618
commit 791fcab2d2
7 changed files with 54 additions and 31 deletions

View file

@ -727,10 +727,20 @@ FFZ.prototype.tokenize_chat_line = function(msgObject, prevent_notification, del
// Mentions!
if ( ! from_me ) {
tokens = this.tokenize_mentions(tokens);
var st = this.settings.remove_filtered;
for(var i=0; i < tokens.length; i++) {
var token = tokens[i],
is_mention = token.type === "mention";
is_mention = token.type === "mention",
is_removed = token.type === "deleted" || token.censoredLink;
if ( is_removed )
if ( st === 2 )
msgObject.ffz_removed = true;
else if ( st === 1 ) {
msgObject.ffz_deleted = true;
msgObject.deleted = true;
}
if ( ! is_mention || token.isOwnMessage )
continue;