1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-29 07:45:33 +00:00

Fixed a bug with mention parsing when there are no keywords set.

This commit is contained in:
SirStendec 2015-02-08 02:59:20 -05:00
parent c568f23134
commit 19f7c5669e
4 changed files with 10 additions and 4 deletions

View file

@ -519,6 +519,9 @@ FFZ.get_capitalization = function(name, callback) {
if ( window.BetterTTV ) if ( window.BetterTTV )
return BetterTTV.chat.helpers.lookupDisplayName(name); return BetterTTV.chat.helpers.lookupDisplayName(name);
if ( ! name )
return name;
name = name.toLowerCase(); name = name.toLowerCase();
if ( name == "jtv" || name == "twitchnotify" ) if ( name == "jtv" || name == "twitchnotify" )
return name; return name;
@ -585,7 +588,7 @@ FFZ._mentions_to_regex = function(list) {
FFZ.prototype._mentionize = function(controller, tokens) { FFZ.prototype._mentionize = function(controller, tokens) {
var mention_words = this.settings.keywords; var mention_words = this.settings.keywords;
if ( ! mention_words ) if ( ! mention_words || ! mention_words.length )
return tokens; return tokens;
if ( typeof tokens == "string" ) if ( typeof tokens == "string" )

2
script.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -170,6 +170,9 @@ FFZ.get_capitalization = function(name, callback) {
if ( window.BetterTTV ) if ( window.BetterTTV )
return BetterTTV.chat.helpers.lookupDisplayName(name); return BetterTTV.chat.helpers.lookupDisplayName(name);
if ( ! name )
return name;
name = name.toLowerCase(); name = name.toLowerCase();
if ( name == "jtv" || name == "twitchnotify" ) if ( name == "jtv" || name == "twitchnotify" )
return name; return name;
@ -236,7 +239,7 @@ FFZ._mentions_to_regex = function(list) {
FFZ.prototype._mentionize = function(controller, tokens) { FFZ.prototype._mentionize = function(controller, tokens) {
var mention_words = this.settings.keywords; var mention_words = this.settings.keywords;
if ( ! mention_words ) if ( ! mention_words || ! mention_words.length )
return tokens; return tokens;
if ( typeof tokens == "string" ) if ( typeof tokens == "string" )

View file

@ -405,7 +405,7 @@
} }
.theatre.ffz-chat-background .ember-chat .chat-messages .chat-line.ffz-alternate, .ffz-chat-background .chat-container.dark .ember-chat .chat-messages .chat-line.ffz-alternate { .theatre.ffz-chat-background .ember-chat .chat-messages .chat-line.ffz-alternate, .ffz-chat-background .chat-container.dark .ember-chat .chat-messages .chat-line.ffz-alternate {
background-color: rgba(255,255,255, 0.1); background-color: rgba(255,255,255, 0.05);
} }
.ffz-chat-background .ember-chat .chat-messages .chat-line.ffz-mentioned { .ffz-chat-background .ember-chat .chat-messages .chat-line.ffz-mentioned {