Add hash for js instead of loading it again later.
This commit is contained in:
parent
a6e0dd4ab8
commit
ed8cbfb535
|
@ -93,6 +93,7 @@ BetterDiscord.prototype.init = function() {
|
||||||
this.getUtils().download("api.github.com", "/repos/Jiiks/BetterDiscordApp/commits/"+branch+"", function(data) {
|
this.getUtils().download("api.github.com", "/repos/Jiiks/BetterDiscordApp/commits/"+branch+"", function(data) {
|
||||||
try {
|
try {
|
||||||
_hash = JSON.parse(data).sha;
|
_hash = JSON.parse(data).sha;
|
||||||
|
self.getUtils().execJs("var _hash = " + _hash + ";");
|
||||||
}catch(err) { self.quit("Failed to load hash : " + err); }
|
}catch(err) { self.quit("Failed to load hash : " + err); }
|
||||||
if(typeof(_hash) == "undefined") {
|
if(typeof(_hash) == "undefined") {
|
||||||
self.quit("Failed to load hash");
|
self.quit("Failed to load hash");
|
||||||
|
|
Loading…
Reference in New Issue