logs and init

This commit is contained in:
Jiiks 2015-08-31 16:36:28 +03:00
parent 02dd3687dd
commit c9b03178fd
7 changed files with 11 additions and 12 deletions

View File

@ -82,8 +82,8 @@ Core.prototype.init = function() {
waitForGuildsWrapper(); waitForGuildsWrapper();
}, 100); }, 100);
} }
} }
waitForGuildsWrapper();
} }
Core.prototype.initSettings = function() { Core.prototype.initSettings = function() {

View File

@ -83,7 +83,7 @@ EmoteModule.prototype.injectEmote = function(node) {
EmoteModule.prototype.autoCapitalize = function() { EmoteModule.prototype.autoCapitalize = function() {
var self = this; var self = this;
console.log("autocap");
$('body').delegate($(".channel-textarea-inner textarea"), 'keyup change paste', function() { $('body').delegate($(".channel-textarea-inner textarea"), 'keyup change paste', function() {
if(!settingsCookie["bda-es-4"]) return; if(!settingsCookie["bda-es-4"]) return;

View File

@ -82,8 +82,8 @@ Core.prototype.init = function() {
waitForGuildsWrapper(); waitForGuildsWrapper();
}, 100); }, 100);
} }
} }
waitForGuildsWrapper();
} }
Core.prototype.initSettings = function() { Core.prototype.initSettings = function() {
@ -129,7 +129,6 @@ Core.prototype.initObserver = function() {
mainObserver.observe(document, { childList: true, subtree: true }); mainObserver.observe(document, { childList: true, subtree: true });
} }
/* BetterDiscordApp EmoteModule JavaScript /* BetterDiscordApp EmoteModule JavaScript
* Version: 1.3 * Version: 1.3
* Author: Jiiks | http://jiiks.net * Author: Jiiks | http://jiiks.net
@ -215,7 +214,7 @@ EmoteModule.prototype.injectEmote = function(node) {
EmoteModule.prototype.autoCapitalize = function() { EmoteModule.prototype.autoCapitalize = function() {
var self = this; var self = this;
console.log("autocap");
$('body').delegate($(".channel-textarea-inner textarea"), 'keyup change paste', function() { $('body').delegate($(".channel-textarea-inner textarea"), 'keyup change paste', function() {
if(!settingsCookie["bda-es-4"]) return; if(!settingsCookie["bda-es-4"]) return;
@ -288,7 +287,7 @@ function QuickEmoteMenu() {
} }
QuickEmoteMenu.prototype.init = function (reload) { QuickEmoteMenu.prototype.init = function (reload) {
console.log("quickemote init");
emoteBtn = null; emoteBtn = null;
if(!emoteMenu) { if(!emoteMenu) {
@ -394,7 +393,7 @@ SettingsPanel.prototype.init = function() {
}else { }else {
sof = "tc-switch-off active"; sof = "tc-switch-off active";
} }
console.log(value.implemented);
settingsList.append($("<li/>").append($("<h2/>", { text: key})).append($("<span/>", { html: " - <span>" + value.info + "</span>" + (value.implemented == false ? '<span style="color:red"> Coming Soon</span>' : "") })).append($("<div/>", { class: value.implemented ? "tc-switch" : "tc-switch disabled", id: value.id }).append($("<span/>", { class: sof, text: "OFF" })).append($("<span/>", { class: son, text: "ON" })))); settingsList.append($("<li/>").append($("<h2/>", { text: key})).append($("<span/>", { html: " - <span>" + value.info + "</span>" + (value.implemented == false ? '<span style="color:red"> Coming Soon</span>' : "") })).append($("<div/>", { class: value.implemented ? "tc-switch" : "tc-switch disabled", id: value.id }).append($("<span/>", { class: sof, text: "OFF" })).append($("<span/>", { class: son, text: "ON" }))));
}) })
@ -496,4 +495,4 @@ Utils.prototype.getTextArea = function() {
Utils.prototype.jqDefer = function(fnc) { Utils.prototype.jqDefer = function(fnc) {
if(window.jQuery) { fnc(); } else { setTimeout(function() { this.jqDefer(fnc) }, 100) } if(window.jQuery) { fnc(); } else { setTimeout(function() { this.jqDefer(fnc) }, 100) }
} }

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ function QuickEmoteMenu() {
} }
QuickEmoteMenu.prototype.init = function (reload) { QuickEmoteMenu.prototype.init = function (reload) {
console.log("quickemote init");
emoteBtn = null; emoteBtn = null;
if(!emoteMenu) { if(!emoteMenu) {

View File

@ -34,7 +34,7 @@ SettingsPanel.prototype.init = function() {
}else { }else {
sof = "tc-switch-off active"; sof = "tc-switch-off active";
} }
console.log(value.implemented);
settingsList.append($("<li/>").append($("<h2/>", { text: key})).append($("<span/>", { html: " - <span>" + value.info + "</span>" + (value.implemented == false ? '<span style="color:red"> Coming Soon</span>' : "") })).append($("<div/>", { class: value.implemented ? "tc-switch" : "tc-switch disabled", id: value.id }).append($("<span/>", { class: sof, text: "OFF" })).append($("<span/>", { class: son, text: "ON" })))); settingsList.append($("<li/>").append($("<h2/>", { text: key})).append($("<span/>", { html: " - <span>" + value.info + "</span>" + (value.implemented == false ? '<span style="color:red"> Coming Soon</span>' : "") })).append($("<div/>", { class: value.implemented ? "tc-switch" : "tc-switch disabled", id: value.id }).append($("<span/>", { class: sof, text: "OFF" })).append($("<span/>", { class: son, text: "ON" }))));
}) })

View File

@ -85,7 +85,7 @@ BetterDiscord.prototype.start = function() {
}); });
//Start BDA //Start BDA
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('var mainCore; var startBda = function() { mainCore = new Core(); mainCore.init(); }');
self.getUtils().execJs("function startDefer() { if(window.Core && window.jQuery && $.cookie){ startBda(); } else { setTimeout(function() { startDefer(); }, 100) } } startDefer(); ") self.getUtils().execJs("function startDefer() { if(window.Core && window.jQuery && $.cookie){ startBda(); } else { setTimeout(function() { startDefer(); }, 100) } } startDefer(); ")
}); });