Get latest commit hash
This commit is contained in:
parent
0121c00a2c
commit
f95ecc12e3
10
js/main.js
10
js/main.js
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
||||
};
|
Loading…
Reference in New Issue