Get latest commit hash

This commit is contained in:
Jiiks 2015-11-01 13:37:04 +02:00
parent 0121c00a2c
commit f95ecc12e3
2 changed files with 19 additions and 0 deletions

View File

@ -70,6 +70,7 @@ Core.prototype.init = function() {
}
utils = new Utils();
utils.getHash();
emoteModule = new EmoteModule();
quickEmoteMenu = new QuickEmoteMenu();
voiceMode = new VoiceMode();
@ -694,6 +695,8 @@ SettingsPanel.prototype.handler = function(e){
* https://github.com/Jiiks/BetterDiscordApp
*/
var _hash;
function Utils() {
}
@ -706,6 +709,13 @@ Utils.prototype.jqDefer = function(fnc) {
if(window.jQuery) { fnc(); } else { setTimeout(function() { this.jqDefer(fnc) }, 100) }
};
Utils.prototype.getHash = function() {
$.getJson("https://api.github.com/repos/Jiiks/BetterDiscordApp/commits/master", function(data) {
_hash = data.sha;
});
};
/* BetterDiscordApp VoiceMode JavaScript
* Version: 1.0
* Author: Jiiks | http://jiiks.net

View File

@ -5,6 +5,8 @@
* https://github.com/Jiiks/BetterDiscordApp
*/
var _hash;
function Utils() {
}
@ -15,4 +17,11 @@ Utils.prototype.getTextArea = function() {
Utils.prototype.jqDefer = function(fnc) {
if(window.jQuery) { fnc(); } else { setTimeout(function() { this.jqDefer(fnc) }, 100) }
};
Utils.prototype.getHash = function() {
$.getJson("https://api.github.com/repos/Jiiks/BetterDiscordApp/commits/master", function(data) {
_hash = data.sha;
});
};