Make emote command minimum length 4 characters to get rid of garbage emotes

This commit is contained in:
Jiiks 2015-10-30 03:28:37 +02:00
parent f211b26621
commit 306a00152a
3 changed files with 9 additions and 1 deletions

View File

@ -70,6 +70,10 @@ EmoteModule.prototype.injectEmote = function(node) {
words.some(function(word) {
if(word.length < 4) {
return;
}
if(emotesTwitch.emotes.hasOwnProperty(word)) {
parentInnerHTML = parentInnerHTML.replace(word, "<img src=" + twitchEmoteUrlStart + emotesTwitch.emotes[word].image_id + twitchEmoteUrlEnd + " ><\/img>");
return;

View File

@ -229,6 +229,10 @@ EmoteModule.prototype.injectEmote = function(node) {
words.some(function(word) {
if($.inArray(word, bemotes) != -1) return;
if(word.length < 4) {
return;
}
if(emotesTwitch.emotes.hasOwnProperty(word)) {
parentInnerHTML = parentInnerHTML.replace(word, "<img src=" + twitchEmoteUrlStart + emotesTwitch.emotes[word].image_id + twitchEmoteUrlEnd + " ><\/img>");

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long