From 3c08f25a603c05b813f9243c6713e10a1def47c1 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sat, 24 Oct 2015 15:28:38 +0300 Subject: [PATCH] slow --- devjs/main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/devjs/main.js b/devjs/main.js index f672319b..ba9e79d9 100644 --- a/devjs/main.js +++ b/devjs/main.js @@ -197,6 +197,20 @@ EmoteModule.prototype.injectEmote = function(node) { if(!words) return; words.some(function(word) { + + + //Let's see how slow this is + $.each(subEmotesTwitch.channels, function() { + $.each(this.emotes, function() { + if(this.code == word) { + parentInnerHTML = parentInnerHTML.replace(word, "<\/img>"); + } + }); + }); + + + + if (emotesTwitch.emotes.hasOwnProperty(word)) { parentInnerHTML = parentInnerHTML.replace(word, "<\/img>"); } else if(subEmotesTwitch.emotes.hasOwnProperty(word)) {