diff --git a/js/main.js b/js/main.js
index 2a88adc..65db80d 100644
--- a/js/main.js
+++ b/js/main.js
@@ -831,7 +831,7 @@ PublicServers.prototype.init = function () {
\
\
\
- \
+ \
\
\
\
@@ -872,8 +872,8 @@ PublicServers.prototype.getPinnedServer = function() {
"size": 1,
"query": {
"query_string": {
- "default_operator": "AND",
- "query": "BetterDiscord"
+ "default_operator": "AND",
+ "query": "BetterDiscord"
}
}
};
@@ -1075,7 +1075,7 @@ PublicServers.prototype.loadServers = function(dataset, search, clear) {
};
PublicServers.prototype.search = function(start, clear) {
- var sterm = $("#pubs-sterm").val();
+ var sterm = $("#pubs-sterm").val();
var dataset = {
"sort": [{ "online": "desc" }],
diff --git a/js/main.min.js b/js/main.min.js
index df1f1d7..1ee6dba 100644
--- a/js/main.min.js
+++ b/js/main.min.js
@@ -1,2 +1,96 @@
-function Core(){}function EmoteModule(){}function PublicServers(){}function QuickEmoteMenu(){}function CustomCssEditor(){}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"),utils.injectJs("https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.4.2/Sortable.min.js")}function Utils(){}function VoiceMode(){}function PluginModule(){}function ThemeModule(){}function BdWSocket(){bdws=this}function BdApi(){}var settingsPanel,emoteModule,utils,quickEmoteMenu,opublicServers,voiceMode,pluginModule,themeModule,customCssEditor,jsVersion=1.72,supportedVersion="0.2.5",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,hidden:!1,cat:"core"},"Public Servers":{id:"bda-gs-1",info:"Display public servers button",implemented:!0,hidden:!1,cat:"core"},"Minimal Mode":{id:"bda-gs-2",info:"Hide elements and reduce the size of elements.",implemented:!0,hidden:!1,cat:"core"},"Voice Mode":{id:"bda-gs-4",info:"Only show voice chat",implemented:!0,hidden:!1,cat:"core"},"Hide Channels":{id:"bda-gs-3",info:"Hide channels in minimal mode",implemented:!0,hidden:!1,cat:"core"},"Dark Mode":{id:"bda-gs-5",info:"Make certain elements dark by default(wip)",implemented:!0,hidden:!1,cat:"core"},"Override Default Emotes":{id:"bda-es-5",info:"Override default emotes",implemented:!1,hidden:!1,cat:"core"},"Voice Disconnect":{id:"bda-dc-0",info:"Disconnect from voice server when closing Discord",implemented:!0,hidden:!1,cat:"core"},"Custom css live update":{id:"bda-css-0",info:"",implemented:!0,hidden:!0,cat:"core"},"Custom css auto udpate":{id:"bda-css-1",info:"",implemented:!0,hidden:!0,cat:"core"},"24 Hour Timestamps":{id:"bda-gs-6",info:"Replace 12hr timestamps with proper ones",implemented:!0,hidden:!1,cat:"core"},"Coloured Text":{id:"bda-gs-7",info:"Make text colour the same as role colour",implemented:!0,hidden:!1,cat:"core"},"Twitch Emotes":{id:"bda-es-7",info:"Show Twitch emotes",implemented:!0,hidden:!1,cat:"emote"},"FrankerFaceZ Emotes":{id:"bda-es-1",info:"Show FrankerFaceZ Emotes",implemented:!0,hidden:!1,cat:"emote"},"BetterTTV Emotes":{id:"bda-es-2",info:"Show BetterTTV Emotes",implemented:!0,hidden:!1,cat:"emote"},"Emote Menu":{id:"bda-es-0",info:"Show Twitch/Favourite emotes in emote menu",implemented:!0,hidden:!1,cat:"emote"},"Emoji Menu":{id:"bda-es-9",info:"Show Discord emoji menu",implemented:!0,hidden:!1,cat:"emote"},"Emote Autocomplete":{id:"bda-es-3",info:"Autocomplete emote commands",implemented:!1,hidden:!1,cat:"emote"},"Emote Auto Capitalization":{id:"bda-es-4",info:"Autocapitalize emote commands",implemented:!0,hidden:!1,cat:"emote"},"Show Names":{id:"bda-es-6",info:"Show emote names on hover",implemented:!0,hidden:!1,cat:"emote"},"Show emote modifiers":{id:"bda-es-8",info:"Enable emote mods",implemented:!0,hidden:!1,cat:"emote"}},links={"Jiiks.net":{text:"Jiiks.net",href:"thtp://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-gs-5":!0,"bda-gs-6":!1,"bda-gs-7":!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-es-8":!0,"bda-jd":!0,"bda-es-8":!0,"bda-dc-0":!1,"bda-css-0":!1,"bda-css-1":!1,"bda-es-9":!0},bdchangelog={changes:{a:{title:"v1.72 : Public Servers",text:"Public servers now have categories, description, tags, dark mode and more!",img:""},b:{title:"v1.72 : Import/Export",text:"Import/Export buttons now disappear in themes/plugins tabs to avoid confusion",img:""},c:{title:"v1.72 : Changelog",text:"You can now reopen this changelog from the settings",img:""},d:{title:"v1.71 : Hide Twitch emotes",text:"Hide all emotes option now toggles Twitch emotes instead!",img:""},e:{title:"v1.71 : Override FFZ emote",text:'Use the :bttv emote modifier to override a FFZ emote with a BTTV one!',img:""},f:{title:"v1.70 : 0.2.8 Support",text:"Added support for Core version 0.2.8.",img:""},g:{title:"v1.70 : Setting Import/Export",text:"You can now import and export your settings!",img:""},h:{title:"v1.70 : Public Server List Infinite Scroll",text:"Public server list now has the ability to load more than 20 servers.",img:""},i:{title:"v1.70 : 24 hour timestamps",text:"Replace 12 hour timestamp with 24 hour timestamps!",img:""},j:{title:"v1.70 : Coloured text",text:"Make text colour the same as role colour!",img:""}},fixes:{a:{title:"v1.72 : Settings panel",text:"Settings panel will now show no matter how you open it!",img:""},b:{title:"v1.72 : Fixed emote edit bug",text:"Edits now appear properly even with emotes!",img:""},c:{title:"v1.72 : Public servers",text:"Public servers button is visible again!",img:""},d:{title:"v1.72 : Public servers",text:"Updated public servers api endpoint url for fetching correct serverlist.",img:""},e:{title:"v1.71 : Fixed emotes and edit",text:"Emotes work again! So does editing emotes!",img:""},f:{title:"Spoilers are currently broken :(",text:"Ps. I know this in the fixes section :o",img:""}}},settingsCookie={};Core.prototype.init=function(){function e(){if(console.log((new Date).getTime()+" Defer"),$(".guilds-wrapper .guilds").children().length>0){console.log((new Date).getTime()+" Defer Loaded");var s=($(".guilds>li:first-child"),$("",{"class":"btn",id:"bd-show-channels",text:"R",css:{cursor:"pointer"},click:function(){settingsCookie["bda-gs-3"]=!1,$("body").removeClass("bd-minimal-chan"),t.saveSettings()}}));if($(".guilds-wrapper").prepend(s),opublicServers=new PublicServers,customCssEditor=new CustomCssEditor,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()}),window.addEventListener("beforeunload",function(){settingsCookie["bda-dc-0"]&&$(".btn.btn-disconnect").click()}),$(document).on("mousedown",function(e){}),opublicServers.init(),emoteModule.autoCapitalize(),settingsCookie.version.CodeMirror{ min-width:100%; }"),$("head").append('')}else setTimeout(e,100)}var t=this,s="undefined"==typeof version?bdVersion:version;if(supportedVersion>s)return void this.alert("Not Supported","BetterDiscord v"+s+"(your version) is not supported by the latest js("+jsVersion+").
Please download the latest version from BetterDiscord.net");utils=new Utils;var i=new BdWSocket;i.start(),utils.getHash(),emoteModule=new EmoteModule,quickEmoteMenu=new QuickEmoteMenu,voiceMode=new VoiceMode,emoteModule.init(),this.initSettings(),this.initObserver(),$(document).ready(function(){setTimeout(e,1e3)})},Core.prototype.initSettings=function(){if(void 0==$.cookie("better-discord"))settingsCookie=defaultCookie,this.saveSettings();else{this.loadSettings();for(var e in defaultCookie)void 0==settingsCookie[e]&&(settingsCookie[e]=defaultCookie[e],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"))};var botlist=["119598467310944259"];Core.prototype.initObserver=function(){mainObserver=new MutationObserver(function(e){e.forEach(function(e){if(void 0!==settingsPanel&&settingsPanel.inject(e),$(e.target).find(".emoji-picker").length){var t=e.target.firstChild;t.classList.contains("popout")&&quickEmoteMenu.obsCallback($(t))}"undefined"!=typeof pluginModule&&pluginModule.rawObserver(e),null!=e.target.getAttribute("class")&&((e.target.classList.contains("title-wrap")||e.target.classList.contains("chat"))&&(voiceMode.obsCallback(),"undefined"!=typeof pluginModule&&pluginModule.channelSwitch()),-1!=e.target.getAttribute("class").indexOf("scroller messages")&&"undefined"!=typeof pluginModule&&pluginModule.newMessage(),settingsCookie["bda-gs-6"]&&$(".timestamp").not("[data-24]").each(function(){var e=$(this);e.attr("data-24",!0);var t=e.text(),s=/(.*)?at\s+(\d{1,2}):(\d{1,2})\s+(.*)/.exec(t);if(null==s)return!0;if(s.length<5)return!0;var i=parseInt(s[2]);"AM"==s[4]?12==i&&(i-=12):"PM"==s[4]&&12>i&&(i+=12),s[2]=("0"+i).slice(-2),e.text(s[1]+" at "+s[2]+":"+s[3])}),settingsCookie["bda-gs-7"]&&$(".user-name").not("[data-colour]").each(function(){var e=$(this),t=e.css("color");return"rgb(255, 255, 255)"==t?!0:void e.closest(".message-group").find(".markup").not("[data-colour]").each(function(){$(this).attr("data-colour",!0),$(this).css("color",t)})})),emoteModule.obsCallback(e)})}),mainObserver.observe(document,{childList:!0,subtree:!0})},Core.prototype.constructChangelog=function(){var e='
What\'s new in BetterDiscord JS'+jsVersion+'
';if(null!=bdchangelog.changes){e+='
New Stuff
';for(var t in bdchangelog.changes)t=bdchangelog.changes[t],e+="
"+t.title+"
"+t.text+"
";e+="
"}if(null!=bdchangelog.fixes){e+='
Fixed
';for(var s in bdchangelog.fixes)s=bdchangelog.fixes[s],e+="
"+s.title+"
"+s.text+"
";e+="
"}if(null!=bdchangelog.upcoming){e+='
Coming Soon
';for(var i in bdchangelog.upcoming)i=bdchangelog.upcoming[i],e+="
'),$("#bd-psm-s").append(t)}},PluginModule.prototype.loadPluginData=function(){var e=$.cookie("bd-plugins");void 0!=e&&(pluginCookie=JSON.parse($.cookie("bd-plugins")))},PluginModule.prototype.savePluginData=function(){$.cookie("bd-plugins",JSON.stringify(pluginCookie),{expires:365,path:"/"})},PluginModule.prototype.newMessage=function(){$.each(bdplugins,function(){pluginCookie[this.plugin.getName()]&&"function"==typeof this.plugin.onMessage&&this.plugin.onMessage()})},PluginModule.prototype.channelSwitch=function(){$.each(bdplugins,function(){pluginCookie[this.plugin.getName()]&&"function"==typeof this.plugin.onSwitch&&this.plugin.onSwitch()})},PluginModule.prototype.socketEvent=function(e,t){$.each(bdplugins,function(){pluginCookie[this.plugin.getName()]&&"function"==typeof this.plugin.socketEvent&&this.plugin.socketEvent(t)})},PluginModule.prototype.rawObserver=function(e){$.each(bdplugins,function(){pluginCookie[this.plugin.getName()]&&"function"==typeof this.plugin.observer&&this.plugin.observer(e)})};var themeCookie={};ThemeModule.prototype.loadThemes=function(){this.loadThemeData(),$.each(bdthemes,function(){var e=this.name,t=!1;themeCookie.hasOwnProperty(e)?themeCookie[e]&&(t=!0):themeCookie[e]=!1,t&&$("head").append('")})},ThemeModule.prototype.handleTheme=function(e){var t=$(e).children().find('input[type="checkbox"]'),s=!t.is(":checked"),i=t.attr("id").substring(2);t.prop("checked",s),s?($("head").append('"),themeCookie[i]=!0):($("#"+i).remove(),themeCookie[i]=!1),this.saveThemeData()},ThemeModule.prototype.loadThemeData=function(){var e=$.cookie("bd-themes");void 0!=e&&(themeCookie=JSON.parse($.cookie("bd-themes")))},ThemeModule.prototype.saveThemeData=function(){$.cookie("bd-themes",JSON.stringify(themeCookie),{expires:365,path:"/"})};var bdSocket,bdws;BdWSocket.prototype.start=function(){},BdWSocket.prototype.open=function(e){utils.log("Socket Host: "+e);try{bdSocket=new WebSocket(e),bdSocket.onopen=this.onOpen,bdSocket.onmessage=this.onMessage,bdSocket.onerror=this.onError,bdSocket.onclose=this.onClose}catch(t){utils.log(t)}},BdWSocket.prototype.onOpen=function(){utils.log("Socket Open");var e={op:2,d:{token:JSON.parse(localStorage.getItem("token")),properties:JSON.parse(localStorage.getItem("superProperties")),v:3}};bdws.send(e)},BdWSocket.prototype.onMessage=function(e){var t,s,i;try{t=JSON.parse(e.data),s=t.d,i=t.t}catch(o){return void utils.err(o)}switch(i){case"READY":bdSocket.interval=setInterval(function(){bdws.send({op:1,d:Date.now()})},s.heartbeat_interval),utils.log("Socket Ready");break;case"PRESENCE_UPDATE":pluginModule.socketEvent("PRESENCE_UPDATE",s);break;case"TYPING_START":pluginModule.socketEvent("TYPING_START",s);break;case"MESSAGE_CREATE":pluginModule.socketEvent("MESSAGE_CREATE",s);break;case"MESSAGE_UPDATE":pluginModule.socketEvent("MESSAGE_UPDATE",s)}},BdWSocket.prototype.onError=function(e){utils.log("Socket Error - "+e.message)},BdWSocket.prototype.onClose=function(e){utils.log("Socket Closed - "+e.code+" : "+e.reason),clearInterval(bdSocket.interval),bdws.start()},BdWSocket.prototype.send=function(e){1==bdSocket.readyState&&bdSocket.send(JSON.stringify(e))},BdWSocket.prototype.getSocket=function(){return bdSocket},BdApi.joinServer=function(e){opublicServers.joinServer(e)},BdApi.injectCSS=function(e,t){$("head").append(''),$("#"+e).html(t)},BdApi.clearCSS=function(e){$("#"+e).remove()},BdApi.getPlugin=function(e){return bdplugins.hasOwnProperty(e)?bdplugins[e].plugin:null},BdApi.getIpc=function(){return betterDiscordIPC},BdApi.getCore=function(){return mainCore},BdApi.getUserIdByName=function(e){for(var t=$(".member-username"),s=0;s:bttv emote modifier to override a FFZ emote with a BTTV one!","img":""},"f":{"title":"v1.70 : 0.2.8 Support","text":"Added support for Core version 0.2.8.","img":""},"g":{"title":"v1.70 : Setting Import/Export","text":"You can now import and export your settings!","img":""},"h":{"title":"v1.70 : Public Server List Infinite Scroll","text":"Public server list now has the ability to load more than 20 servers.","img":""},"i":{"title":"v1.70 : 24 hour timestamps","text":"Replace 12 hour timestamp with 24 hour timestamps!","img":""},"j":{"title":"v1.70 : Coloured text","text":"Make text colour the same as role colour!","img":""}},"fixes":{"a":{"title":"v1.72 : Settings panel","text":"Settings panel will now show no matter how you open it!","img":""},"b":{"title":"v1.72 : Fixed emote edit bug","text":"Edits now appear properly even with emotes!","img":""},"c":{"title":"v1.72 : Public servers","text":"Public servers button is visible again!","img":""},"d":{"title":"v1.72 : Public servers","text":"Updated public servers api endpoint url for fetching correct serverlist.","img":""},"e":{"title":"v1.71 : Fixed emotes and edit","text":"Emotes work again! So does editing emotes!","img":""},"f":{"title":"Spoilers are currently broken :(","text":"Ps. I know this in the fixes section :o","img":""}}};var settingsCookie={};function Core(){}
+Core.prototype.init=function(){var self=this;var lVersion=(typeof(version)==="undefined")?bdVersion:version;if(lVersion Please download the latest version from BetterDiscord.net");return;}
+utils=new Utils();var sock=new BdWSocket();sock.start();utils.getHash();emoteModule=new EmoteModule();quickEmoteMenu=new QuickEmoteMenu();voiceMode=new VoiceMode();emoteModule.init();this.initSettings();this.initObserver();function gwDefer(){console.log(new Date().getTime()+" Defer");if($(".guilds-wrapper .guilds").children().length>0){console.log(new Date().getTime()+" Defer Loaded");var guilds=$(".guilds>li:first-child");var showChannelsButton=$("",{class:"btn",id:"bd-show-channels",text:"R",css:{"cursor":"pointer"},click:function(){settingsCookie["bda-gs-3"]=false;$("body").removeClass("bd-minimal-chan");self.saveSettings();}});$(".guilds-wrapper").prepend(showChannelsButton);opublicServers=new PublicServers();customCssEditor=new CustomCssEditor();pluginModule=new PluginModule();pluginModule.loadPlugins();if(typeof(themesupport2)!=="undefined"){themeModule=new ThemeModule();themeModule.loadThemes();}
+settingsPanel=new SettingsPanel();settingsPanel.init();quickEmoteMenu.init(false);$("#tc-settings-button").on("click",function(){settingsPanel.show();});window.addEventListener("beforeunload",function(){if(settingsCookie["bda-dc-0"]){$('.btn.btn-disconnect').click();}});$(document).on("mousedown",function(e){});opublicServers.init();emoteModule.autoCapitalize();if(settingsCookie["version"].CodeMirror{ min-width:100%; }");$("head").append('');}else{setTimeout(gwDefer,100);}}
+$(document).ready(function(){setTimeout(gwDefer,1000);});};Core.prototype.initSettings=function(){if($.cookie("better-discord")==undefined){settingsCookie=defaultCookie;this.saveSettings();}else{this.loadSettings();for(var setting in defaultCookie){if(settingsCookie[setting]==undefined){settingsCookie[setting]=defaultCookie[setting];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"));};var botlist=["119598467310944259"];Core.prototype.initObserver=function(){mainObserver=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(settingsPanel!==undefined)
+settingsPanel.inject(mutation);if($(mutation.target).find(".emoji-picker").length){var fc=mutation.target.firstChild;if(fc.classList.contains("popout")){quickEmoteMenu.obsCallback($(fc));}}
+if(typeof pluginModule!=="undefined")pluginModule.rawObserver(mutation);if(mutation.target.getAttribute('class')!=null){if(mutation.target.classList.contains('title-wrap')||mutation.target.classList.contains('chat')){voiceMode.obsCallback();if(typeof pluginModule!=="undefined")pluginModule.channelSwitch();}
+if(mutation.target.getAttribute('class').indexOf('scroller messages')!=-1){if(typeof pluginModule!=="undefined")pluginModule.newMessage();}
+if(settingsCookie["bda-gs-6"]){$(".timestamp").not("[data-24]").each(function(){var t=$(this);t.attr("data-24",true);var text=t.text();var matches=/(.*)?at\s+(\d{1,2}):(\d{1,2})\s+(.*)/.exec(text);if(matches==null)return true;if(matches.length<5)return true;var h=parseInt(matches[2]);if(matches[4]=="AM"){if(h==12)h-=12;}else if(matches[4]=="PM"){if(h<12)h+=12;}
+matches[2]=('0'+h).slice(-2);t.text(matches[1]+" at "+matches[2]+":"+matches[3]);});}
+if(settingsCookie["bda-gs-7"]){$(".user-name").not("[data-colour]").each(function(){var t=$(this);var color=t.css("color");if(color=="rgb(255, 255, 255)")return true;t.closest(".message-group").find(".markup").not("[data-colour]").each(function(){$(this).attr("data-colour",true);$(this).css("color",color);});});}}
+emoteModule.obsCallback(mutation);});});mainObserver.observe(document,{childList:true,subtree:true});};Core.prototype.constructChangelog=function(){var changeLog=''+'
'+'
'+'
'+'
'+' What\'s new in BetterDiscord JS'+jsVersion+''+' '+'
'+'
'+'
';if(bdchangelog.changes!=null){changeLog+=''+'
'+' New Stuff'+'
'+'
';for(var change in bdchangelog.changes){change=bdchangelog.changes[change];changeLog+=''+'
'+' '+change.title+''+'
'+change.text+'
'+'
';}
+changeLog+='
';}
+if(bdchangelog.fixes!=null){changeLog+=''+'
'+' Fixed'+'
'+'
';for(var fix in bdchangelog.fixes){fix=bdchangelog.fixes[fix];changeLog+=''+'