From b259b08b32c48faf59fa144808d19ba772c54b27 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sat, 24 Oct 2015 17:11:31 +0300 Subject: [PATCH] remove wait --- devjs/main.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/devjs/main.js b/devjs/main.js index 4711109..bb240d4 100644 --- a/devjs/main.js +++ b/devjs/main.js @@ -63,7 +63,7 @@ Core.prototype.init = function() { this.initObserver(); //Temp - setTimeout(function() { + /* setTimeout(function() { if($(".guilds-wrapper").size() > 0) { $(".guilds li:first-child").after($("
  • ", {id:"tc-settings-li"}).append($("
    ", { class: "guild-inner" }).append($("").append($("
    ", { class: "avatar-small", id: "tc-settings-button" }))))); @@ -77,7 +77,23 @@ Core.prototype.init = function() { waitForGuildsWrapper(); }, 100); } - }, 3000); + }, 3000);*/ + + if($(".guilds-wrapper").size() > 0) { + $(".guilds li:first-child").after($("
  • ", {id:"tc-settings-li"}).append($("
    ", { class: "guild-inner" }).append($("").append($("
    ", { class: "avatar-small", id: "tc-settings-button" }))))); + + settingsPanel = new SettingsPanel(); + settingsPanel.init(); + quickEmoteMenu.init(false); + + $("#tc-settings-button").on("click", function(e) { settingsPanel.show(); }); + } else { + setTimeout(function() { + waitForGuildsWrapper(); + }, 100); + } + + }