From ed8cbfb5354cdfba30bead3438931c5615b46425 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 4 Nov 2015 20:05:19 +0200 Subject: [PATCH] Add hash for js instead of loading it again later. --- lib/BetterDiscord.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/BetterDiscord.js b/lib/BetterDiscord.js index 24d8532..3f4ca41 100644 --- a/lib/BetterDiscord.js +++ b/lib/BetterDiscord.js @@ -93,6 +93,7 @@ BetterDiscord.prototype.init = function() { this.getUtils().download("api.github.com", "/repos/Jiiks/BetterDiscordApp/commits/"+branch+"", function(data) { try { _hash = JSON.parse(data).sha; + self.getUtils().execJs("var _hash = " + _hash + ";"); }catch(err) { self.quit("Failed to load hash : " + err); } if(typeof(_hash) == "undefined") { self.quit("Failed to load hash");