diff --git a/js/main.js b/js/main.js
index 7b8337ca..9442bd71 100644
--- a/js/main.js
+++ b/js/main.js
@@ -116,8 +116,7 @@ Core.prototype.init = function() {
console.log(new Date().getTime() + " Defer Loaded");
var guilds = $(".guilds li:first-child");
- // guilds.after($("
", { id: "bd-pub-li", css: { "height": "20px", "display": settingsCookie["bda-gs-1"] == true ? "" : "none" } }).append($("", { class: "guild-inner", css: { "height": "20px", "border-radius": "4px" } }).append($("").append($("", { css: { "line-height": "20px", "font-size": "12px" }, text: "public", id: "bd-pub-button" })))));
- // guilds.after($("", {id:"tc-settings-li"}).append($("", { class: "guild-inner" }).append($("").append($("", { class: "avatar-small", id: "tc-settings-button" })))));
+ guilds.after($("", { id: "bd-pub-li", css: { "height": "20px", "display": settingsCookie["bda-gs-1"] == true ? "" : "none" } }).append($("", { class: "guild-inner", css: { "height": "20px", "border-radius": "4px" } }).append($("").append($("", { css: { "line-height": "20px", "font-size": "12px" }, text: "public", id: "bd-pub-button" })))));
var showChannelsButton = $("", {
class: "btn",
@@ -145,7 +144,7 @@ Core.prototype.init = function() {
$("#tc-settings-button").on("click", function() { settingsPanel.show(); });
$("#bd-pub-button").on("click", function() { opublicServers.show(); });
- // opublicServers.init();
+ opublicServers.init();
emoteModule.autoCapitalize();
@@ -818,7 +817,7 @@ SettingsPanel.prototype.init = function() {
if (settingsCookie["bda-es-6"]) {
//Pretty emote titles
emoteNamePopup = $("");
- $(document).on("mouseover", ".emote", function() { console.log("yes"); var x = $(this).offset(); var title = $(this).attr("alt"); $(emoteNamePopup).find(".tipsy-inner").text(title); $(emoteNamePopup).css('left', x.left - 25); $(emoteNamePopup).css('top', x.top - 32); $("div[data-reactid='.0.1.1']").append($(emoteNamePopup));});
+ $(document).on("mouseover", ".emote", function() { var x = $(this).offset(); var title = $(this).attr("alt"); $(emoteNamePopup).find(".tipsy-inner").text(title); $(emoteNamePopup).css('left', x.left - 25); $(emoteNamePopup).css('top', x.top - 32); $("div[data-reactid='.0.1.1']").append($(emoteNamePopup));});
$(document).on("mouseleave", ".emote", function(){$(".tipsy").remove()});
} else {
$(document).off('mouseover', '.emote');
@@ -953,7 +952,7 @@ SettingsPanel.prototype.construct = function() {
if (settingsCookie["bda-es-6"]) {
//Pretty emote titles
emoteNamePopup = $("");
- $(document).on("mouseover", ".emote", function() { console.log("yes"); var x = $(this).offset(); var title = $(this).attr("alt"); $(emoteNamePopup).find(".tipsy-inner").text(title); $(emoteNamePopup).css('left', x.left - 25); $(emoteNamePopup).css('top', x.top - 32); $("div[data-reactid='.0.1.1']").append($(emoteNamePopup));});
+ $(document).on("mouseover", ".emote", function() { var x = $(this).offset(); var title = $(this).attr("alt"); $(emoteNamePopup).find(".tipsy-inner").text(title); $(emoteNamePopup).css('left', x.left - 25); $(emoteNamePopup).css('top', x.top - 32); $("div[data-reactid='.0.1.1']").append($(emoteNamePopup));});
$(document).on("mouseleave", ".emote", function(){$(".tipsy").remove()});
} else {
$(document).off('mouseover', '.emote');
@@ -1106,15 +1105,15 @@ Utils.prototype.getHash = function() {
});
};
-Utils.prototype.loadHtml = function(html) {
+Utils.prototype.loadHtml = function(html, callback) {
var container = $("", {
class: "bd-container"
}).appendTo("body");
-
+
//TODO Inject these in next core update
html = '//cdn.rawgit.com/Jiiks/BetterDiscordApp/' + _hash + '/html/' + html + '.html';
- container.load(html);
+ container.load(html, callback());
};
@@ -1130,14 +1129,12 @@ function VoiceMode() {
}
VoiceMode.prototype.obsCallback = function() {
- console.log("voiceMode obs");
var self = this;
if(settingsCookie["bda-gs-4"]) {
self.disable();
setTimeout(function() {
self.enable();
}, 300);
-
}
}
@@ -1159,4 +1156,4 @@ VoiceMode.prototype.disable = function() {
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "").css("min-width", "");
$(".flex-vertical.channels-wrap").first().css("flex-grow", "");
$(".guild-header .btn.btn-hamburger").first().css("visibility", "");
-};
+};
\ No newline at end of file