Wait for hash

This commit is contained in:
Jiiks 2015-11-01 13:57:10 +02:00
parent acc5d4c305
commit 9f18f2a5b5
1 changed files with 9 additions and 0 deletions

View File

@ -183,6 +183,15 @@ function EmoteModule() {
} }
EmoteModule.prototype.init = function() { EmoteModule.prototype.init = function() {
this.getBlacklist();
};
EmoteModule.prototype.getBlacklist = function() {
var self = this;
if(typeof(_hash) == "undefined") {
setTimeout(self.getBlacklist, 50);
return;
}
$.getJSON("https://cdn.rawgit.com/Jiiks/betterDiscordApp/"+_hash+"/emotefilter.json", function(data) { bemotes = data.blacklist; }); $.getJSON("https://cdn.rawgit.com/Jiiks/betterDiscordApp/"+_hash+"/emotefilter.json", function(data) { bemotes = data.blacklist; });
}; };