');
+ }
+
+ var cmo = $("", {
+ class: "item-group"
+ });
+ var cmi = $("", {
+ class: "item",
+ click: function() {
+ var t = $("", { text: self.lastSelector }).appendTo("body");
+ t.select();
+ document.execCommand("copy");
+ t.remove();
+ cm.remove();
+ }
+ }).append($("", { text: "Copy Selector" }));
+ cmo.append(cmi);
+ cm.append(cmo);
+ cm.css("top", (cm.css("top").replace("px", "") - 28) + "px");
+ }
+
+ setTimeout(attach, 100);
+
+ e.stopPropagation();
+ });
+ */
+ };
+
+ devMode.prototype.disable = function() {
+ $(window).off("keydown.bdDevmode");
+ $(window).off("mousedown.bdDevmode")
+ };
\ No newline at end of file
diff --git a/js/main.min.js b/js/main.min.js
index ade9ea1..1093c64 100644
--- a/js/main.min.js
+++ b/js/main.min.js
@@ -1,2 +1,2 @@
-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:""}}},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 c=($(".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"),b.saveSettings()}}));if($(".guilds-wrapper").prepend(c),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(a){}),opublicServers.init(),emoteModule.autoCapitalize(),settingsCookie.version.CodeMirror{ min-width:100%; }"),$("head").append('')}else setTimeout(a,100)}var b=this,c="undefined"==typeof version?bdVersion:version;if(supportedVersion>c)return void this.alert("Not Supported","BetterDiscord v"+c+"(your version) is not supported by the latest js("+jsVersion+").
Please download the latest version from BetterDiscord.net");utils=new Utils;var d=new BdWSocket;d.start(),utils.getHash(),emoteModule=new EmoteModule,quickEmoteMenu=new QuickEmoteMenu,voiceMode=new VoiceMode,dMode=new devMode,emoteModule.init(),this.initSettings(),this.initObserver(),$(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"))};var botlist=["119598467310944259"];Core.prototype.initObserver=function(){mainObserver=new MutationObserver(function(a){a.forEach(function(a){if(void 0!==settingsPanel&&settingsPanel.inject(a),$(a.target).find(".emoji-picker").length){var b=a.target.firstChild;b.classList.contains("popout")&&quickEmoteMenu.obsCallback($(b))}"undefined"!=typeof pluginModule&&pluginModule.rawObserver(a),null!=a.target.getAttribute("class")&&((a.target.classList.contains("title-wrap")||a.target.classList.contains("chat"))&&(voiceMode.obsCallback(),"undefined"!=typeof pluginModule&&pluginModule.channelSwitch()),-1!=a.target.getAttribute("class").indexOf("scroller messages")&&"undefined"!=typeof pluginModule&&pluginModule.newMessage(),settingsCookie["bda-gs-6"]&&$(".timestamp").not("[data-24]").each(function(){var a=$(this);a.attr("data-24",!0);var b=a.text(),c=/(.*)?at\s+(\d{1,2}):(\d{1,2})\s+(.*)/.exec(b);if(null==c)return!0;if(c.length<5)return!0;var d=parseInt(c[2]);"AM"==c[4]?12==d&&(d-=12):"PM"==c[4]&&12>d&&(d+=12),c[2]=("0"+d).slice(-2),a.text(c[1]+" at "+c[2]+":"+c[3])}),settingsCookie["bda-gs-7"]&&$(".user-name").not("[data-colour]").each(function(){var a=$(this),b=a.css("color");return"rgb(255, 255, 255)"==b?!0:void a.closest(".message-group").find(".markup").not("[data-colour]").each(function(){$(this).attr("data-colour",!0),$(this).css("color",b)})})),emoteModule.obsCallback(a)})}),mainObserver.observe(document,{childList:!0,subtree:!0})},Core.prototype.constructChangelog=function(){var a='
What\'s new in BetterDiscord JS'+jsVersion+'
';if(null!=bdchangelog.changes){a+='
New Stuff
';for(var b in bdchangelog.changes)b=bdchangelog.changes[b],a+="
"+b.title+"
"+b.text+"
";a+="
"}if(null!=bdchangelog.fixes){a+='
Fixed
';for(var c in bdchangelog.fixes)c=bdchangelog.fixes[c],a+="
"+c.title+"
"+c.text+"
";a+="
"}if(null!=bdchangelog.upcoming){a+='
Coming Soon
';for(var d in bdchangelog.upcoming)d=bdchangelog.upcoming[d],a+="