Add hash for js instead of loading it again later.

This commit is contained in:
Jiiks 2015-11-04 20:05:19 +02:00
parent a6e0dd4ab8
commit ed8cbfb535
1 changed files with 1 additions and 0 deletions

View File

@ -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");