BetterDiscordApp-v1/js/utils.js

27 lines
618 B
JavaScript
Raw Normal View History

2015-08-26 18:41:18 +02:00
/* BetterDiscordApp Utilities JavaScript
* Version: 1.0
* Author: Jiiks | http://jiiks.net
* Date: 26/08/2015 - 15:54
* https://github.com/Jiiks/BetterDiscordApp
*/
2015-11-01 12:37:04 +01:00
var _hash;
2015-08-26 18:41:18 +02:00
function Utils() {
}
Utils.prototype.getTextArea = function() {
return $(".channel-textarea-inner textarea");
};
2015-08-26 18:41:18 +02:00
Utils.prototype.jqDefer = function(fnc) {
if(window.jQuery) { fnc(); } else { setTimeout(function() { this.jqDefer(fnc) }, 100) }
2015-11-01 12:37:04 +01:00
};
Utils.prototype.getHash = function() {
$.getJson("https://api.github.com/repos/Jiiks/BetterDiscordApp/commits/master", function(data) {
_hash = data.sha;
});
};