From d24a6222ddf268a0e8e9c9b7776208da8ec1ba8c Mon Sep 17 00:00:00 2001 From: Jiiks Date: Tue, 15 Dec 2015 11:13:40 +0200 Subject: [PATCH] New themesupport var --- js/main.js | 4 ++-- js/main.min.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/main.js b/js/main.js index 96658ed2..9189c37e 100644 --- a/js/main.js +++ b/js/main.js @@ -189,7 +189,7 @@ Core.prototype.init = function() { pluginModule = new PluginModule(); pluginModule.loadPlugins(); - if(typeof(themesupport) !== "undefined") { + if(typeof(themesupport2) !== "undefined") { themeModule = new ThemeModule(); themeModule.loadThemes(); } @@ -1169,7 +1169,7 @@ SettingsPanel.prototype.construct = function() { ' '};var emotesFfz={},emotesBTTV={},emotesTwitch={emotes:{emote:{image_id:0}}},subEmotesTwitch={};EmoteModule.prototype.init=function(){},EmoteModule.prototype.getBlacklist=function(){$.getJSON("https://cdn.rawgit.com/Jiiks/betterDiscordApp/"+_hash+"/emotefilter.json",function(A){bemotes=A.blacklist})},EmoteModule.prototype.obsCallback=function(A){var D=this;if(settingsCookie["bda-es-7"])for(var B=0;B-1)return;return Q.addClass("spoiler"),void Q.on("click",function(){$(this).removeClass("spoiler"),spoilered.push($(this).attr("data-reactid"))})}if(!(D.length<4)&&-1==$.inArray(D,bemotes)){if(emotesTwitch.emotes.hasOwnProperty(D)){var P=Math.round(D.length/4);return void(A=A.replace(D,''+D.substr(0,P)+'))}if("undefined"!=typeof emotesFfz&&settingsCookie["bda-es-1"]&&emotesFfz.hasOwnProperty(D)){var P=Math.round(D.length/4),g=D.substr(0,P)+"﷙"+D.substr(P,P)+"﷙"+D.substr(2*P,P)+"﷙"+D.substr(3*P),e=ffzEmoteUrlStart+emotesFfz[D]+ffzEmoteUrlEnd;return void(A=A.replace(D,'
'+g+'
'))}if("undefined"!=typeof emotesBTTV&&settingsCookie["bda-es-2"]&&emotesBTTV.hasOwnProperty(D)){var P=Math.round(D.length/4),g=D.substr(0,P)+"﷙"+D.substr(P,P)+"﷙"+D.substr(2*P,P)+"﷙"+D.substr(3*P),e=emotesBTTV[D];return void(A=A.replace(D,'
'+g+'
'))}if("undefined"!=typeof emotesBTTV2&&settingsCookie["bda-es-2"]&&emotesBTTV2.hasOwnProperty(D)){var P=Math.round(D.length/4),g=D.substr(0,P)+"﷙"+D.substr(P,P)+"﷙"+D.substr(2*P,P)+"﷙"+D.substr(3*P),e=bttvEmoteUrlStart+emotesBTTV2[D]+bttvEmoteUrlEnd;return void(A=A.replace(D,'
'+g+'
'))}if(subEmotesTwitch.hasOwnProperty(D)){var P=Math.round(D.length/4),g=D.substr(0,P)+"﷙"+D.substr(P,P)+"﷙"+D.substr(2*P,P)+"﷙"+D.substr(3*P),e=twitchEmoteUrlStart+subEmotesTwitch[D]+twitchEmoteUrlEnd;return void(A=A.replace(D,'
'+g+'
'))}}}),null!=B.parentElement)){var Q=B.parentElement.offsetHeight;B.innerHTML=A.replace(new RegExp("﷙","g"),"");var w=B.parentElement.offsetHeight,P=$(".scroller.messages").first();P.scrollTop(P.scrollTop()+(w-Q))}}}if("undefined"!=typeof emotesTwitch&&A.parentElement){var B=A.parentElement;if("SPAN"==B.tagName){var Q=!1;$(B.parentElement).hasClass("edited")&&(B=B.parentElement.parentElement.firstChild,Q=!0),Q?setTimeout(D,250):D()}}},EmoteModule.prototype.autoCapitalize=function(){var A=this;$("body").delegate($(".channel-textarea-inner textarea"),"keyup change paste",function(){if(settingsCookie["bda-es-4"]){var D=$(".channel-textarea-inner textarea").val();if(void 0!=D){var B=D.split(" ").pop();if(B.length>3){var Q=A.capitalize(B.toLowerCase());null!=Q&&$(".channel-textarea-inner textarea").val(D.replace(B,Q))}}}})},EmoteModule.prototype.capitalize=function(A){var D=emotesTwitch.emotes;for(var B in D)if(D.hasOwnProperty(B)&&A==(B+"").toLowerCase())return B};var publicServers={servers:{server:{code:0,icon:null,title:"title",language:"EN",description:"description"}}};PublicServers.prototype.getPanel=function(){return this.container},PublicServers.prototype.init=function(){var A=this;this.container=$("
",{id:"bd-ps-container",style:"display:none"});var D=$("
",{id:"bd-ps-header"});$("

",{text:"Public Servers"}).appendTo(D),$("",{id:"bd-ps-close",style:"cursor:pointer;",text:"X"}).appendTo(D),D.appendTo(this.getPanel());var B=$("
",{id:"bd-ps-body"});B.appendTo(this.getPanel());var Q=$("",{border:"0"}),w=$("");w.appendTo(Q);var P=$("",{}).append($("",{id:"bd-ps-tbody"});g.appendTo(Q),Q.appendTo(B),$("body").append(this.getPanel()),$("#bd-ps-close").on("click",function(){A.show()});var e=publicServers.servers;for(var E in e)if(e.hasOwnProperty(E)){var t=e[E],s=t.code,C=t.title,o=t.language,v=t.description;this.addServer(E,s,C,o,v)}},PublicServers.prototype.addServer=function(A,D,B,Q,w){var P=this,g=$("#bd-ps-tbody"),e=$("");E.append($("
",{text:"Name"})).append($("",{text:"Code"})).append($("",{text:"Language"})).append($("",{text:"Description"})).append($("",{text:"Join"}));P.appendTo(w);var g=$("
").append($("
",{"class":"bd-ps-description",text:w})),E=$("
",{text:B})),E.append($("",{css:{"-webkit-user-select":"initial","user-select":"initial"},text:D})),E.append($("",{text:Q})),E.append(e),E.append($("").append($("