",{text:"Join"}));s.appendTo(o);var n=$("",{id:"bd-ps-tbody"});n.appendTo(i),i.appendTo(t),$("body").append(this.getPanel()),$("#bd-ps-close").on("click",function(){A.show()});var g=publicServers.servers;for(var B in g)if(g.hasOwnProperty(B)){var a=g[B],r=a.code,Q=a.title,E=a.language,d=a.description;this.addServer(B,r,Q,E,d)}},PublicServers.prototype.addServer=function(A,e,t,i,o){var s=this,n=$("#bd-ps-tbody"),g=$("
").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(){s.joinServer(e)}}))),n.append(B)},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 e;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(){return e=!e,e?(emoteMenu.addClass("emotemenu-open"),$(this).addClass("twitchcord-button-open")):(emoteMenu.removeClass(),$(this).removeClass()),!1}),$(document).off("click.bdem").on("click.bdem",function(){e&&(e=!e,emoteMenu.removeClass(),$("#twitchcord-button").removeClass())}),$("#emote-menu").on("click",function(){return $("#rmenu").hide(),!1}),settingsCookie["bda-es-0"]&&($(".channel-textarea").first().addClass("emotemenu-enabled"),emoteBtn.show());var t=$(".emote-icon");t.off(),t.on("click",function(){var A=$(this).attr("title"),e=$(".channel-textarea-inner textarea");e.val(" "==e.val().slice(-1)?e.val()+A:e.val()+" "+A)});var i=localStorage.bdfavemotes;void 0!=i&&(favoriteEmotes=JSON.parse(atob(i)),this.updateFavorites())},QuickEmoteMenu.prototype.obsCallback=function(){$("#snowcover").remove(),$("#decor").remove(),$("#santasled").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(""),
+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.56,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":!0,"bda-es-2":!0,"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:{core:{title:"Core 0.2.5",text:"Core v0.2.5 has been made more universal. Download the latest from https://betterdiscord.net ).",img:""},plugins:{title:"Plugin Settings!",text:"Plugins can now add their own settings panel!",img:""},plugins2:{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:""},qemotemenu:{title:"Quick emote menu!",text:"Quick emote menu now closes when you click anywhere else and you can favorite twitch global emotes!",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:""},femotes:{title:"Favorite Emotes!",text:"Favorite emotes right click now always works!",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:""}}},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 t=$(".guilds li:first-child");t.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 i=$("",{"class":"btn",id:"bd-show-channels",text:"R",css:{cursor:"pointer"},click:function(){settingsCookie["bda-gs-3"]=!1,$("body").removeClass("bd-minimal-chan"),e.saveSettings()}});if($(".guilds-wrapper").prepend(i),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 e=this;return version Please download the latest version from BetterDiscord.net"):(utils=new Utils,utils.getHash(),emoteModule=new EmoteModule,quickEmoteMenu=new QuickEmoteMenu,voiceMode=new VoiceMode,emoteModule.init(),this.initSettings(),this.initObserver(),void $(document).ready(function(){setTimeout(A,1e3)}))},Core.prototype.initSettings=function(){if(void 0==$.cookie("better-discord"))settingsCookie=defaultCookie,this.saveSettings();else{this.loadSettings();for(var A in defaultCookie)void 0==settingsCookie[A]&&(settingsCookie[A]=defaultCookie[A],this.saveSettings())}},Core.prototype.saveSettings=function(){$.cookie("better-discord",JSON.stringify(settingsCookie),{expires:365,path:"/"})},Core.prototype.loadSettings=function(){settingsCookie=JSON.parse($.cookie("better-discord"))},Core.prototype.initObserver=function(){mainObserver=new MutationObserver(function(A){A.forEach(function(A){null!=A.target.getAttribute("class")&&-1!=A.target.getAttribute("class").indexOf("titlebar")&&(quickEmoteMenu.obsCallback(),voiceMode.obsCallback()),emoteModule.obsCallback(A)})}),mainObserver.observe(document,{childList:!0,subtree:!0})},Core.prototype.constructChangelog=function(){var A='
What\'s new in BetterDiscord JS v1.53&'+jsVersion+'
';if(null!=bdchangelog.changes){A+='
New Stuff
';for(var e in bdchangelog.changes)e=bdchangelog.changes[e],A+="
"+e.title+"
"+e.text+"
";A+="
"}if(null!=bdchangelog.fixes){A+='
Fixed
';for(var t in bdchangelog.fixes)t=bdchangelog.fixes[t],A+="
"+t.title+"
"+t.text+"
";A+="
"}if(null!=bdchangelog.upcoming){A+='
Coming Soon
';for(var i in bdchangelog.upcoming)i=bdchangelog.upcoming[i],A+="
",{text:"Join"}));s.appendTo(o);var n=$("",{id:"bd-ps-tbody"});n.appendTo(i),i.appendTo(t),$("body").append(this.getPanel()),$("#bd-ps-close").on("click",function(){A.show()});var g=publicServers.servers;for(var B in g)if(g.hasOwnProperty(B)){var a=g[B],r=a.code,Q=a.title,E=a.language,d=a.description;this.addServer(B,r,Q,E,d)}},PublicServers.prototype.addServer=function(A,e,t,i,o){var s=this,n=$("#bd-ps-tbody"),g=$("