From ba7bb20ab89d6fe7275773b856c589b1dd1fd294 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Mon, 26 Oct 2015 07:02:41 +0200 Subject: [PATCH] k --- devjs/main.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/devjs/main.js b/devjs/main.js index 8d2e8f0..0ec5284 100644 --- a/devjs/main.js +++ b/devjs/main.js @@ -108,7 +108,7 @@ Core.prototype.init = function() { $(document).ready(function() { - setTimeout(gwDefer, 5000); + setTimeout(gwDefer, 1000); }); }; @@ -262,14 +262,13 @@ EmoteModule.prototype.injectEmote = function(node) { }; EmoteModule.prototype.autoCapitalize = function() { - console.log("autocapitalize init"); - var self = this; - var textArea = $(".channel-textarea-inner textarea"); - $('body').delegate(textArea, 'keyup change paste', function() { + var self = this; + + $('body').delegate($(".channel-textarea-inner textarea"), 'keyup change paste', function() { if(!settingsCookie["bda-es-4"]) return; - var text = textArea.val(); + var text = $(".channel-textarea-inner textarea").val(); if(text == undefined) return; @@ -277,7 +276,7 @@ EmoteModule.prototype.autoCapitalize = function() { if(lastWord.length > 3) { var ret = self.capitalize(lastWord.toLowerCase()); if(ret != null) { - textArea.val(text.replace(lastWord, ret)); + $(".channel-textarea-inner textarea").val(text.replace(lastWord, ret)); } } });