function Core(){}function EmoteModule(){}function PublicServers(){}function QuickEmoteMenu(){}function SettingsPanel(){utils.injectJs("https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/codemirror.min.js"),utils.injectJs("https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.9.0/mode/css/css.min.js")}function Utils(){}function VoiceMode(){}function PluginModule(){}function ThemeModule(){}function BdApi(){}var settingsPanel,emoteModule,utils,quickEmoteMenu,opublicServers,voiceMode,pluginModule,themeModule,jsVersion=1.54,supportedVersion="0.2.3",mainObserver,twitchEmoteUrlStart="https://static-cdn.jtvnw.net/emoticons/v1/",twitchEmoteUrlEnd="/1.0",ffzEmoteUrlStart="https://cdn.frankerfacez.com/emoticon/",ffzEmoteUrlEnd="/1",bttvEmoteUrlStart="https://cdn.betterttv.net/emote/",bttvEmoteUrlEnd="/1x",mainCore,settings={"Save logs locally":{id:"bda-gs-0",info:"Saves chat logs locally",implemented:!1},"Public Servers":{id:"bda-gs-1",info:"Display public servers button",implemented:!0},"Minimal Mode":{id:"bda-gs-2",info:"Hide elements and reduce the size of elements.",implemented:!0},"Voice Mode":{id:"bda-gs-4",info:"Only show voice chat",implemented:!0},"Hide Channels":{id:"bda-gs-3",info:"Hide channels in minimal mode",implemented:!0},"Quick Emote Menu":{id:"bda-es-0",info:"Show quick emote menu for adding emotes",implemented:!0},"Show Emotes":{id:"bda-es-7",info:"Show any emotes",implemented:!0},"FrankerFaceZ Emotes":{id:"bda-es-1",info:"Show FrankerFaceZ Emotes",implemented:!0},"BetterTTV Emotes":{id:"bda-es-2",info:"Show BetterTTV Emotes",implemented:!0},"Emote Autocomplete":{id:"bda-es-3",info:"Autocomplete emote commands",implemented:!1},"Emote Auto Capitalization":{id:"bda-es-4",info:"Autocapitalize emote commands",implemented:!0},"Override Default Emotes":{id:"bda-es-5",info:"Override default emotes",implemented:!1},"Show Names":{id:"bda-es-6",info:"Show emote names on hover",implemented:!0}},links={"Jiiks.net":{text:"Jiiks.net",href:"http://jiiks.net",target:"_blank"},twitter:{text:"Twitter",href:"http://twitter.com/jiiksi",target:"_blank"},github:{text:"Github",href:"http://github.com/jiiks",target:"_blank"}},defaultCookie={version:jsVersion,"bda-gs-0":!1,"bda-gs-1":!0,"bda-gs-2":!1,"bda-gs-3":!1,"bda-gs-4":!1,"bda-es-0":!0,"bda-es-1":!1,"bda-es-2":!1,"bda-es-3":!1,"bda-es-4":!1,"bda-es-5":!0,"bda-es-6":!0,"bda-es-7":!0,"bda-jd":!0},bdchangelog={changes:{favemotes:{title:"Favorite Emotes!",text:"You can now favorite emotes and have them listed in the quick emote menu!",img:""},plugins:{title:"Plugins!",text:"Combined with Core 0.2.3, you can now write JavaScript plugins for Discord!",img:""},settingsmenu:{title:"Settings Menu!",text:"New and improved settings menu!",img:""},csseditor:{title:"New CSS Editor!",text:"New CSS Editor powered by CodeMirror! ",img:""},minimalmode:{title:"Minimal mode makeover!",text:"New and improved minimal mode!",img:""}},fixes:{reload:{title:"Reload Fix!",text:"Fixed an issue that caused Discord to crash on reload!",img:""},eemotes:{title:"Edit Emotes!",text:"Edited messages now display emotes properly!",img:""},pservers:{title:"Public Servers",text:"Public servers have been fixed!",img:""},other:{title:"Bugfixes!",text:"Several smaller bugs fixed!",img:""}},upcoming:{ignore:{title:"Ignore User!",text:"Ignore users you don't like!",img:""},themes:{title:"Custom themes!",text:"Write your own or download custom themes!",img:""},favemotes:{title:"Favorite emotes!",text:"Add your favorite emote(s) to the quick emote menu!",img:""},more:{title:"More Things!",text:"More things but probably not in the next version!",img:""}}},settingsCookie={};Core.prototype.init=function(){function A(){if(console.log((new Date).getTime()+" Defer"),$(".guilds-wrapper .guilds").children().length>0){console.log((new Date).getTime()+" Defer Loaded");var B=$(".guilds li:first-child");B.after($("
",{id:"bd-pub-li",css:{height:"20px",display:1==settingsCookie["bda-gs-1"]?"":"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 Q=$(" ",{"class":"btn",id:"bd-show-channels",text:"R",css:{cursor:"pointer"},click:function(){settingsCookie["bda-gs-3"]=!1,$("body").removeClass("bd-minimal-chan"),D.saveSettings()}});if($(".guilds-wrapper").prepend(Q),opublicServers=new PublicServers,pluginModule=new PluginModule,pluginModule.loadPlugins(),"undefined"!=typeof themesupport2&&(themeModule=new ThemeModule,themeModule.loadThemes()),settingsPanel=new SettingsPanel,settingsPanel.init(),quickEmoteMenu.init(!1),$("#tc-settings-button").on("click",function(){settingsPanel.show()}),$("#bd-pub-button").on("click",function(){opublicServers.show()}),opublicServers.init(),emoteModule.autoCapitalize(),settingsCookie.versionDate.now||(Date.now=function(){return(new Date).getTime()}),function(){"use strict";for(var t=["webkit","moz"],e=0;el-(this.size+6)&&this.reset(),this.element.style.top=this.y+"px",this.element.style.left=this.x+"px",this.step+=this.stepSize,this.x+=y===!1?Math.cos(this.step):y+Math.cos(this.step),i.collection&&this.x>this.target.x&&this.xthis.target.y&&this.ythis.target.height)if(s+this.speed+this.size>this.target.height){for(;s+this.speed+this.size>this.target.height&&this.speed>0;)this.speed*=.5;t.fillStyle="#fff",void 0==n[parseInt(e)][parseInt(s+this.speed+this.size)]?(n[parseInt(e)][parseInt(s+this.speed+this.size)]=1,t.fillRect(e,s+this.speed+this.size,this.size,this.size)):(n[parseInt(e)][parseInt(s+this.speed)]=1,t.fillRect(e,s+this.speed,this.size,this.size)),this.reset()}else this.speed=1,this.stepSize=0,parseInt(e)+10&&void 0==n[parseInt(e)-1][parseInt(s)+1]?this.x--:(t.fillStyle="#fff",t.fillRect(e,s,this.size,this.size),n[parseInt(e)][parseInt(s)]=1,this.reset())}(this.x+this.size>d-c||this.x",{"class":"snowfall-canvas"}),z=[];if(u.top-g>0){t("body").append(x),x.css({position:i.flakePosition,left:u.left+"px",top:u.top-g+"px"}).prop({width:u.width,height:g});for(var v=0;v'),$("head").append("")}else setTimeout(A,100)}var D=this;return version '};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,' '))}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,''))}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,''))}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,''))}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,''))}}}),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($(" ",{text:"Name"})).append($(" ",{text:"Code"})).append($(" ",{text:"Language"})).append($(" ",{text:"Description"})).append($(" ",{text:"Join"}));P.appendTo(w);var g=$(" ",{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=$(" ").append($("
",{"class":"bd-ps-description",text:w})),E=$(" ");E.append($(" ",{text:B})),E.append($(" ",{css:{"-webkit-user-select":"initial","user-select":"initial"},text:D})),E.append($(" ",{text:Q})),E.append(e),E.append($(" ").append($(" ",{text:"Join",css:{height:"30px",display:"block","margin-top":"10px","background-color":"#36393E",border:"1px solid #404040",outline:"1px solid #000",color:"#EDEDED"},click:function(){P.joinServer(D)}}))),g.append(E)},PublicServers.prototype.show=function(){this.getPanel().toggle();var A=$("#bd-pub-li");A.removeClass(),this.getPanel().is(":visible")&&A.addClass("active")},PublicServers.prototype.joinServer=function(A){$(".guilds-add").click(),$(".action.join .btn").click(),$(".create-guild-container input").val(A),$(".form.join-server .btn-primary").click()};var emoteBtn,emoteMenu;QuickEmoteMenu.prototype.init=function(A){emoteBtn=null,$(".channel-textarea").first().removeClass("emotemenu-enabled"),emoteMenu||this.initEmoteList();var D;emoteBtn=$("
",{id:"twitchcord-button-container",style:"display:none"}).append($(" ",{id:"twitchcord-button",onclick:"return false;"})),$(".content.flex-spacer.flex-horizontal .flex-spacer.flex-vertical form").append(emoteBtn),emoteMenu.detach(),emoteBtn.append(emoteMenu),$("#twitchcord-button").on("click",function(){D=!D,D?(emoteMenu.addClass("emotemenu-open"),$(this).addClass("twitchcord-button-open")):(emoteMenu.removeClass(),$(this).removeClass())}),settingsCookie["bda-es-0"]&&($(".channel-textarea").first().addClass("emotemenu-enabled"),emoteBtn.show());var B=$(".emote-icon");B.off(),B.on("click",function(){var A=$(this).attr("title"),D=$(".channel-textarea-inner textarea");D.val(" "==D.val().slice(-1)?D.val()+A:D.val()+" "+A)});var Q=localStorage.bdfavemotes;void 0!=Q&&(favoriteEmotes=JSON.parse(atob(Q)),this.updateFavorites())},QuickEmoteMenu.prototype.obsCallback=function(){$("#snowcover").remove(),$("#decor").remove();var A=$("#customcss").html();if(("/channels/86004744966914048/86004744966914048"==window.location.pathname||A.indexOf("snow")>-1)&&(-1==$("#customcss").html().indexOf("nosnow")&&($(".scroller.messages").snowfall("clear"),$(".scroller.messages").snowfall({flakeCount:100,maxSpeed:10})),A.indexOf("nodecor")>-1?$("#decor").remove():$("head").append(""),
A.indexOf("nobottomsnow")>-1?$("#snowcover").remove():$("head").append("")),emoteBtn&&$(".content.flex-spacer.flex-horizontal .flex-spacer.flex-vertical form")){var D=$("#twitchcord-button-container");void 0==D.parent().prop("tagName")&&(quickEmoteMenu=new QuickEmoteMenu,quickEmoteMenu.init(!0))}};var favoriteEmotes={};QuickEmoteMenu.prototype.initEmoteList=function(){emoteMenu=$("
",{id:"emote-menu"});var A=$("
",{id:"emote-menu-header"}),D=$("
",{id:"emote-menu-inner"}),B=$("
",{id:"emote-menu-inner-fav",css:{display:"none"}}),Q=$("
",{"class":"emote-menu-tab emote-menu-tab-selected",id:"emgb",text:"Global",click:function(){$("#emfa").removeClass("emote-menu-tab-selected"),$("#emgb").addClass("emote-menu-tab-selected"),$("#emote-menu-inner-fav").hide(),$("#emote-menu-inner").show()}}),w=$("
",{"class":"emote-menu-tab",id:"emfa",text:"Favorite",click:function(){$("#emgb").removeClass("emote-menu-tab-selected"),$("#emfa").addClass("emote-menu-tab-selected"),$("#emote-menu-inner").hide(),$("#emote-menu-inner-fav").show()}});A.append(Q),A.append(w),emoteMenu.append(A);var P=$("
",{"class":"scroller-wrap"}),g=$("
",{"class":"scroller"});P.append(g),g.append(D),g.append(B),emoteMenu.append(P);for(var e in emotesTwitch.emotes)if(emotesTwitch.emotes.hasOwnProperty(e)){var E=emotesTwitch.emotes[e].image_id;D.append($("
",{"class":"emote-container"}).append($(" ",{"class":"emote-icon",id:e,alt:"",src:"https://static-cdn.jtvnw.net/emoticons/v1/"+E+"/1.0",title:e})))}},QuickEmoteMenu.prototype.favorite=function(A,D){$("#rmenu").length||($("body").append(''),$(document).on("click",function(){$("#rmenu").hide()})),favoriteEmotes.hasOwnProperty(A)||(favoriteEmotes[A]=D),this.updateFavorites()},QuickEmoteMenu.prototype.updateFavorites=function(){var A=this,D=$("#emote-menu-inner-fav");D.empty();for(var B in favoriteEmotes){var Q=favoriteEmotes[B],w=$("
",{"class":"emote-container"}),P=$(" ",{"class":"emote-icon",alt:"",src:Q,title:B}).appendTo(w);D.append(w),P.off("click").on("click",function(A){var D=$(this).attr("title"),B=$(".channel-textarea-inner textarea");B.val(" "==B.val().slice(-1)?B.val()+D:B.val()+" "+D)}),P.off("contextmenu").on("contextmenu",function(D){var B=$(this).attr("title"),Q=$("#rmenu");return Q.find("a").off("click").on("click",function(){delete favoriteEmotes[B],A.updateFavorites()}),Q.hide(),Q.css({top:D.pageY,left:D.pageX}),Q.show(),!1})}window.localStorage.bdfavemotes=btoa(JSON.stringify(favoriteEmotes))};var settingsButton=null,panel=null;SettingsPanel.prototype.init=function(){var A=this;A.construct();var D=$("body");settingsCookie["bda-es-0"]?$("#twitchcord-button-container").show():$("#twitchcord-button-container").hide(),settingsCookie["bda-gs-2"]?D.addClass("bd-minimal"):D.removeClass("bd-minimal"),settingsCookie["bda-gs-3"]?D.addClass("bd-minimal-chan"):D.removeClass("bd-minimal-chan"),settingsCookie["bda-gs-4"]&&voiceMode.enable(),settingsCookie["bda-jd"]&&(opublicServers.joinServer("0Tmfo5ZbORCRqbAd"),settingsCookie["bda-jd"]=!1,mainCore.saveSettings()),settingsCookie["bda-es-6"]?(emoteNamePopup=$(""),$(document).on("mouseover",".emote",function(){var A=$(this).offset(),D=$(this).attr("alt");$(emoteNamePopup).find(".tipsy-inner").text(D),$(emoteNamePopup).css("left",A.left-25),$(emoteNamePopup).css("top",A.top-32),$("div[data-reactid='.0.1.1']").append($(emoteNamePopup))}),$(document).on("mouseleave",".emote",function(){$(".tipsy").remove()})):$(document).off("mouseover",".emote")},SettingsPanel.prototype.applyCustomCss=function(A){0==$("#customcss").length&&$("head").append(''),$("#customcss").html(A),localStorage.setItem("bdcustomcss",btoa(A))};var customCssInitialized=!1,lastTab="";SettingsPanel.prototype.changeTab=function(A){var D=this;lastTab=A;var B=$("#bd-control-groups");switch($(".bd-tab").removeClass("selected"),$(".bd-pane").hide(),$("#"+A).addClass("selected"),$("#"+A.replace("tab","pane")).show(),A){case"bd-settings-tab":break;case"bd-customcss-tab":if(!customCssInitialized){var Q=CodeMirror.fromTextArea(document.getElementById("bd-custom-css-ta"),{lineNumbers:!0,mode:"css",indentUnit:4,theme:"neat"});Q.on("change",function(A){var B=A.getValue();D.applyCustomCss(B)}),customCssInitialized=!0}break;case"bd-plugins-tab":break;case"bd-themes-tab":B.html("Coming soon ")}},SettingsPanel.prototype.updateSetting=function(A){var D=$(A).children().find('input[type="checkbox"]'),B=!D.is(":checked"),Q=D.attr("id");D.prop("checked",B),settingsCookie[Q]=B,settingsCookie["bda-es-0"]?$("#twitchcord-button-container").show():$("#twitchcord-button-container").hide(),settingsCookie["bda-gs-2"]?$("body").addClass("bd-minimal"):$("body").removeClass("bd-minimal"),settingsCookie["bda-gs-3"]?$("body").addClass("bd-minimal-chan"):$("body").removeClass("bd-minimal-chan"),settingsCookie["bda-gs-1"]?$("#bd-pub-li").show():$("#bd-pub-li").hide(),settingsCookie["bda-gs-4"]?voiceMode.enable():voiceMode.disable(),settingsCookie["bda-es-6"]?(emoteNamePopup=$(""),$(document).on("mouseover",".emote",function(){var A=$(this).offset(),D=$(this).attr("alt");$(emoteNamePopup).find(".tipsy-inner").text(D),$(emoteNamePopup).css("left",A.left-25),$(emoteNamePopup).css("top",A.top-32),$("div[data-reactid='.0.1.1']").append($(emoteNamePopup))}),$(document).on("mouseleave",".emote",function(){$(".tipsy").remove()})):$(document).off("mouseover",".emote"),mainCore.saveSettings()},SettingsPanel.prototype.construct=function(){function A(){$(".tab-bar-item").removeClass("selected"),settingsButton.addClass("selected"),$(".form .settings-right .settings-inner").first().hide(),panel.show(),""==lastTab?B.changeTab("bd-settings-tab"):B.changeTab(lastTab)}function D(){$(".btn.btn-settings").length<1?setTimeout(D,100):$(".btn.btn-settings").first().on("click",function(){function A(){if($(".modal-inner").first().is(":visible")){panel.hide();var D=$(".tab-bar.SIDE").first();$(".tab-bar.SIDE .tab-bar-item").click(function(){$(".form .settings-right .settings-inner").first().show(),$("#bd-settings-new").removeClass("selected"),panel.hide()}),D.append(settingsButton),panel.insertAfter(".form .settings-right .settings-inner"),$("#bd-settings-new").removeClass("selected")}else setTimeout(A,100)}A()})}var B=this;panel=$("
",{id:"bd-pane","class":"settings-inner",css:{display:"none"}});var Q='',settingsButton=$("
",{"class":"tab-bar-item",text:"BetterDiscord",id:"bd-settings-new",click:A}),panel.html(Q),D()};var _hash;Utils.prototype.getTextArea=function(){return $(".channel-textarea-inner textarea")},Utils.prototype.jqDefer=function(A){window.jQuery?A():setTimeout(function(){this.jqDefer(A)},100)},Utils.prototype.getHash=function(){$.getJSON("https://api.github.com/repos/Jiiks/BetterDiscordApp/commits/master",function(A){_hash=A.sha,emoteModule.getBlacklist()})},Utils.prototype.loadHtml=function(A,D){var B=$("
",{"class":"bd-container"}).appendTo("body");A="//cdn.rawgit.com/Jiiks/BetterDiscordApp/"+_hash+"/html/"+A+".html",B.load(A,D())},Utils.prototype.injectJs=function(A){$("",{type:"text/javascript",src:A}).appendTo($("body"))},Utils.prototype.injectCss=function(A){$(" ",{type:"text/css",rel:"stylesheet",href:A}).appendTo($("head"))},VoiceMode.prototype.obsCallback=function(){var A=this;settingsCookie["bda-gs-4"]&&(A.disable(),setTimeout(function(){A.enable()},300))},VoiceMode.prototype.enable=function(){$(".scroller.guild-channels ul").first().css("display","none"),$(".scroller.guild-channels header").first().css("display","none"),$(".app.flex-vertical").first().css("overflow","hidden"),$(".chat.flex-vertical.flex-spacer").first().css("visibility","hidden").css("min-width","0px"),$(".flex-vertical.channels-wrap").first().css("flex-grow","100000"),$(".guild-header .btn.btn-hamburger").first().css("visibility","hidden")},VoiceMode.prototype.disable=function(){$(".scroller.guild-channels ul").first().css("display",""),$(".scroller.guild-channels header").first().css("display",""),$(".app.flex-vertical").first().css("overflow",""),$(".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","")};var pluginCookie={};PluginModule.prototype.loadPlugins=function(){this.loadPluginData(),$.each(bdplugins,function(){var A=this.plugin;A.load();var D=A.getName(),B=!1;pluginCookie.hasOwnProperty(D)?B=pluginCookie[D]:pluginCookie[D]=!1,B&&A.start()})},PluginModule.prototype.handlePlugin=function(A){var D=$(A).children().find('input[type="checkbox"]'),B=!D.is(":checked"),Q=D.attr("id");D.prop("checked",B),B?(bdplugins[Q].plugin.start(),pluginCookie[Q]=!0):(bdplugins[Q].plugin.stop(),pluginCookie[Q]=!1),this.savePluginData()},PluginModule.prototype.loadPluginData=function(){var A=$.cookie("bd-plugins");void 0!=A&&(pluginCookie=JSON.parse($.cookie("bd-plugins")))},PluginModule.prototype.savePluginData=function(){$.cookie("bd-plugins",JSON.stringify(pluginCookie),{expires:365,path:"/"})};var themeCookie={};ThemeModule.prototype.loadThemes=function(){this.loadThemeData(),$.each(bdthemes,function(){var A=this.name,D=!1;themeCookie.hasOwnProperty(A)?themeCookie[A]&&(D=!0):themeCookie[A]=!1,D&&$("head").append('")})},ThemeModule.prototype.handleTheme=function(A){var D=$(A).children().find('input[type="checkbox"]'),B=!D.is(":checked"),Q=D.attr("id").substring(2);D.prop("checked",B),B?($("head").append('"),themeCookie[Q]=!0):($("#"+Q).remove(),themeCookie[Q]=!1),this.saveThemeData()},ThemeModule.prototype.loadThemeData=function(){var A=$.cookie("bd-themes");void 0!=A&&(themeCookie=JSON.parse($.cookie("bd-themes")))},ThemeModule.prototype.saveThemeData=function(){$.cookie("bd-themes",JSON.stringify(themeCookie),{expires:365,path:"/"})},BdApi.joinServer=function(A){opublicServers.joinServer(A)},BdApi.injectCSS=function(A,D){$("head").append(''),$("#"+A).html(D)},BdApi.clearCSS=function(A){$("#"+A).remove()},BdApi.getPlugin=function(A){return bdplugins.hasOwnProperty(A)?bdplugins[A].plugin:null},BdApi.getIpc=function(){return betterDiscordIPC},BdApi.getCore=function(){return mainCore},BdApi.getUserIdByName=function(A){for(var D=$(".member-username"),B=0;B