From 90800c1b80841888a2fc78c15cf930c4c0b950d9 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Wed, 25 Apr 2018 18:38:09 -0400 Subject: [PATCH] hotfix for emote menu --- js/main.js | 4 ++-- js/main.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 6ee52629..1eb2b52a 100644 --- a/js/main.js +++ b/js/main.js @@ -393,8 +393,8 @@ Core.prototype.initObserver = function () { } // Emoji Picker - if (node.classList.contains('popout') && !node.classList.contains('popout-left')) { - if (node.getElementsByClassName('emoji-picker').length || node.getElementsByClassName('emojiPicker-3g68GS').length) quickEmoteMenu.obsCallback(node); + if (node.classList.contains('popout-2RRwAO') && !node.classList.contains('popoutLeft-3EZ_zL')) { + if (node.getElementsByClassName('emojiPicker-3g68GS').length) quickEmoteMenu.obsCallback(node); } // onSwitch() diff --git a/js/main.min.js b/js/main.min.js index 76a73f94..695a7c1e 100644 --- a/js/main.min.js +++ b/js/main.min.js @@ -1,4 +1,4 @@ -(function(){let a=window.require("fs"),r=window.require("process"),o=r.platform,d=("win32"===o?r.env.APPDATA:"darwin"===o?r.env.HOME+"/Library/Preferences":process.env.HOME+"/.config")+"/BetterDiscord/",l="localStorage.json",u={};if(a.existsSync(`${d}${l}`))try{u=JSON.parse(a.readFileSync(`${d}${l}`))}catch(b){console.log(b)}else if(a.existsSync(l))try{u=JSON.parse(a.readFileSync(l))}catch(b){console.log(b)}var h=u;h.setItem=function(b,f){h[b]=f,this.save()},h.getItem=function(b){return h[b]||null},h.save=function(){a.writeFileSync(`${d}${l}`,JSON.stringify(this),null,4)};var g=new Proxy(h,{set:function(b,f,y){h[f]=y,h.save()},get:function(b,f){return h[f]||null}});window.localStorage=g})(),(()=>{let a=document.createElement("div");a.className="bd-loaderv2",a.title="BetterDiscord is loading...",document.body.appendChild(a)})(),window.bdStorage={},window.bdStorage.get=function(a){return betterDiscordIPC.sendSync("synchronous-message",{arg:"storage",cmd:"get","var":a})},window.bdStorage.set=function(a,r){betterDiscordIPC.sendSync("synchronous-message",{arg:"storage",cmd:"set","var":a,data:r})},window.bdPluginStorage={},window.bdPluginStorage.get=function(a,r){return betterDiscordIPC.sendSync("synchronous-message",{arg:"pluginstorage",cmd:"get",pn:a,"var":r})},window.bdPluginStorage.set=function(a,r,o){betterDiscordIPC.sendSync("synchronous-message",{arg:"pluginstorage",cmd:"set",pn:a,"var":r,data:o})},betterDiscordIPC.on("asynchronous-reply",(a,r)=>{console.log(a),console.log(r)});var bdSettings={},bdSettingsStorage={};bdSettingsStorage.initialize=function(){let a=require("fs"),r={};a.existsSync(bdConfig.dataPath+"/bdsettings.json")&&(r=JSON.parse(a.readFileSync(bdConfig.dataPath+"/bdsettings.json"))),bdSettings=r?r:{}},bdSettingsStorage.get=function(a){return bdSettings[a]?bdSettings[a]:null},bdSettingsStorage.set=function(a,r){let o=require("fs");bdSettings[a]=r;try{return o.writeFileSync(bdConfig.dataPath+"/bdsettings.json",JSON.stringify(bdSettings,null,4)),!0}catch(d){return utils.err(d),!1}};var settingsPanel,emoteModule,utils,quickEmoteMenu,voiceMode,pluginModule,themeModule,dMode,publicServersModule,jsVersion=1.792,supportedVersion="0.2.81",bbdVersion="0.0.7",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"},"BetterDiscord Blue":{id:"bda-gs-b",info:"Replace Discord blue with BD Blue",implemented:!0,hidden:!1,cat:"core"},"Developer Mode":{id:"bda-gs-8",info:"Developer Mode",implemented:!0,hidden:!1,cat:"core"},"Startup Error Modal":{id:"fork-ps-1",info:"Show a modal with plugin/theme errors on startup",implemented:!0,hidden:!1,cat:"fork"},"Show Toasts":{id:"fork-ps-2",info:"Shows a small notification for starting and stopping plugins & themes",implemented:!0,hidden:!1,cat:"fork"},"Scroll To Settings":{id:"fork-ps-3",info:"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)",implemented:!0,hidden:!1,cat:"fork"},"Emote Modifier Tooltip":{id:"fork-es-1",info:"Shows the emote modifier in the tooltip.",implemented:!0,hidden:!1,cat:"fork"},"Animate On Hover":{id:"fork-es-2",info:"Only animate the emote modifiers on hover",implemented:!0,hidden:!1,cat:"fork"},"Copy Selector":{id:"fork-dm-1",info:"Adds a \"Copy Selector\" option to context menus when developer mode is active",implemented:!0,hidden:!1,cat:"fork"},"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 (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)",implemented:!0,hidden:!1,cat:"emote"}},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-gs-8":!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-gs-b":!0,"bda-es-8":!0,"bda-jd":!0,"bda-dc-0":!1,"bda-css-0":!1,"bda-css-1":!1,"bda-es-9":!0,"fork-dm-1":!1,"fork-ps-1":!0,"fork-ps-2":!0,"fork-ps-3":!0,"fork-es-1":!0,"fork-es-2":!1,"fork-pub-notice":!1},settingsCookie={},bdpluginErrors,bdthemeErrors,bdConfig=null;function Core(a){a?a.newLoader=!0:a={branch:"master",repo:"rauenzi",updater:{CDN:"cdn.rawgit.com"}},window.bdConfig=a}Core.prototype.init=async function(){function a(){0
I just overhauled and fixed the public servers module. Since it was broken for a long time, I've enabled it for you and I suggest you go ahead and check it out!"),bdStorage.set("publicServerNotice",!0))):setTimeout(a,100)}var r=this;bdConfig.deferLoaded=!1;var o="undefined"==typeof version?bdVersion:version;return o
Please download the latest version from BetterDiscord.net"):void(utils=new Utils,utils.getHash(),emoteModule=new EmoteModule,utils.log("Initializing EmoteModule"),emoteModule.init(),publicServersModule=new V2_PublicServers,quickEmoteMenu=new QuickEmoteMenu,voiceMode=new VoiceMode,dMode=new devMode,utils.log("Initializing Settings"),this.initSettings(),$(document).ready(function(){setTimeout(a,1e3)}))},Core.prototype.injectExternals=function(){utils.injectJs("https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js")},Core.prototype.initSettings=function(){if(bdSettingsStorage.initialize(),$.cookie("better-discord"))return settingsCookie=JSON.parse($.cookie("better-discord")),this.saveSettings(),void $.removeCookie("better-discord",{path:"/"});if(!bdSettingsStorage.get("settings"))settingsCookie=defaultCookie,this.saveSettings();else for(var a in this.loadSettings(),$("