BetterDiscordApp-rauenzi/js/utils.js

27 lines
618 B
JavaScript

/* BetterDiscordApp Utilities JavaScript
* Version: 1.0
* Author: Jiiks | http://jiiks.net
* Date: 26/08/2015 - 15:54
* https://github.com/Jiiks/BetterDiscordApp
*/
var _hash;
function Utils() {
}
Utils.prototype.getTextArea = function() {
return $(".channel-textarea-inner textarea");
};
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;
});
};