release 0.1.3

This commit is contained in:
Jiiks 2015-08-30 13:11:02 +03:00
parent 972714ec85
commit 1b426b13f3
2 changed files with 14 additions and 33 deletions

View File

@ -1,8 +1,8 @@
/* BetterDiscordApp Entry
* Version: 1.1
* Version: 1.2
* Author: Jiiks | http://jiiks.net
* Date: 27/08/2015 - 15:51
* Last Update: 29/08/2015 - 22:300
* Last Update: 30/08/2015 - 13:10
* https://github.com/Jiiks/BetterDiscordApp
*/
@ -43,32 +43,6 @@ BetterDiscord.prototype.init = function() {
});
return;
console.log("BetterDiscord v" + version + " Initialized");
self.getUtils().getWebContents().on('did-finish-load', function() {
});
self.getUtils().getWebContents().on('dom-ready', function() {
self.getUtils().execJs('var version = "0.1.2";');
self.getUtils().injectJavaScript("//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"); //jquery
//CSS
self.getUtils().execJs('function injectCss() { $(\'head\').append(\'<link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/rawgit.com\/Jiiks\/BetterDiscordApp\/master\/css\/main.min.css\">\') }');
self.getUtils().execJs('var deferCount = 0; function defer() { if(window.jQuery) { injectCss() } else { setTimeout( function() { if(deferCount < 100) { deferCount++; defer(); } else { alert("BetterDiscord failed to load :( try restarting Discord. code:0x01"); } }, 100 ); } } deferCount = 0; defer();');
//JavaScript
setTimeout(function() {
self.getUtils().injectJavaScript("//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js");
self.getUtils().injectJavaScript("https://rawgit.com/Jiiks/BetterDiscordApp/806eeabd2473d7b65746bc67a4c1e2cf77a55bd6/js/main.min.js");
// setTimeout(funct)
// self.getUtils().execJs("var mainCore = new Core(); mainCore.init();");
}, 2000);
});
}
BetterDiscord.prototype.start = function() {
@ -97,15 +71,22 @@ BetterDiscord.prototype.start = function() {
//CSS
self.getUtils().execJs('function injectMainCss() { $(\'head\').append( \'<link rel=\"stylesheet\" type=\"text\/css\" href=\"\/\/'+_updater.CDN+'\/Jiiks\/BetterDiscordApp\/'+_hash+'\/css\/main.min.css\">\' ) }');
//self.getUtils().execJs('function injectCss() { $(\'head\').append(\'<link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/rawgit.com\/Jiiks\/BetterDiscordApp\/master\/css\/main.min.css\">\') }');
self.getUtils().execJs('var deferCount = 0; function defer() { if(window.jQuery) { injectMainCss() } else { setTimeout( function() { if(deferCount < 100) { deferCount++; defer(); } else { alert("BetterDiscord failed to load :( try restarting Discord. code:0x01"); } }, 100 ); } } deferCount = 0; defer();');
self.getUtils().injectJavaScript("//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js", true);
self.getUtils().injectJavaScript("//" + _updater.CDN + "/Jiiks/BetterDiscordApp/"+_hash+"/js/main.min.js", true);
self.getUtils().injectJavaScript("//" + _updater.CDN + "/Jiiks/BetterDiscordApp/"+_hash+"/js/main.js", true);
self.getUtils().download("//" + _updater.CDN + "/Jiiks/BetterDiscordApp/"+_hash+"/js/emotedata_twitch.js", function(emotedata) {
self.getUtils().execJs("emotesTwitch = " + emotedata);
});
self.getUtils().download("//" + _updater.CDN + "/Jiiks/BetterDiscordApp/"+_hash+"/js/emotedata_ffz.js", function(emotedata) {
self.getUtils().execJs("emotesFfz = " + emotedata);
});
//Start BDA
self.getUtils().execJs("var mainCore; var startBda = function() { mainCore = new Core(); mainCore.init(); }");
self.getUtils().execJs('var mainCore; var startBda = function() { $("#twitchcord-button-container").ready(function() { console.log("its ready now"); }); mainCore = new Core(); mainCore.init(); }');
self.getUtils().execJs("function startDefer() { if(window.Core && window.jQuery && $.cookie){ startBda(); } else { setTimeout(function() { startDefer(); }, 100) } } startDefer(); ")
});

View File

@ -1,6 +1,6 @@
{
"Core": {
"Version": "0.1.2"
"Version": "0.1.3"
},
"EmoteModule": {
"Twitch":{