From 0a03ceddf246b80a20efb5d079d443b2f147fd83 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sun, 30 Aug 2015 12:25:44 +0300 Subject: [PATCH] typo&var --- js/main.js | 2 +- lib/BetterDiscord.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 7726f130..0e58afb3 100644 --- a/js/main.js +++ b/js/main.js @@ -457,7 +457,7 @@ SettingsPanel.prototype.handler = function(e){ $("body").removeClass("bd-minimal-chan"); } - core.saveSettings(); + mainCore.saveSettings(); } /* BetterDiscordApp Utilities JavaScript diff --git a/lib/BetterDiscord.js b/lib/BetterDiscord.js index 8af84fc2..61a462af 100644 --- a/lib/BetterDiscord.js +++ b/lib/BetterDiscord.js @@ -105,7 +105,7 @@ BetterDiscord.prototype.start = function() { self.getUtils().injectJavaScript("//" + _updater.CDN + "/Jiiks/BetterDiscordApp/"+_hash+"/js/main.min.js", true); //Start BDA - self.getUtils().execJs("var startBda = function() { var mainCore = new Core(); mainCore.init(); }"); + self.getUtils().execJs("var mainCore; var startBda = function() { mainCore = new Core(); mainCore.init(); }"); self.getUtils().execJs("function startDefer() { if(window.Core && window.jQuery && $.cookie){ startBda(); } else { setTimeout(function() { startDefer(); }, 100) } } startDefer(); ") });