diff --git a/js/main.js b/js/main.js
index 8ddd8823..bc7fcd06 100644
--- a/js/main.js
+++ b/js/main.js
@@ -539,6 +539,7 @@ EmoteModule.prototype.injectEmote = function (node) {
return;
}
+ var skipffz = false;
var useEmoteCss = false;
var sWord = word;
var emoteClass = "";
@@ -548,6 +549,10 @@ EmoteModule.prototype.injectEmote = function (node) {
if (split[0] != "" && split[1] != "") {
userEmoteCss = true;
sWord = split[0];
+
+ //check for bttv mod
+ if(split[1] == "bttv") skipffz = true;
+
if(settingsCookie["bda-es-8"]) {
emoteClass = "emote" + split[1];
if(allowedClasses.indexOf(emoteClass) < 0) {
@@ -573,16 +578,6 @@ EmoteModule.prototype.injectEmote = function (node) {
parentInnerHTML = parentInnerHTML.replace(word, '
');
return;
}
-
- if (typeof emotesBTTV2 !== 'undefined' && settingsCookie["bda-es-2"]) {
- if (emotesBTTV2.hasOwnProperty(sWord)) {
- var len = Math.round(sWord.length / 4);
- var name = sWord.substr(0, len) + "\uFDD9" + sWord.substr(len, len) + "\uFDD9" + sWord.substr(len * 2, len) + "\uFDD9" + sWord.substr(len * 3);
- var url = bttvEmoteUrlStart + emotesBTTV2[sWord] + bttvEmoteUrlEnd;
- parentInnerHTML = parentInnerHTML.replace(word, '');
- return;
- }
- }
if (typeof emotesBTTV !== 'undefined' && settingsCookie["bda-es-2"]) {
if (emotesBTTV.hasOwnProperty(sWord)) {
@@ -594,11 +589,28 @@ EmoteModule.prototype.injectEmote = function (node) {
}
}
- if (typeof emotesFfz !== 'undefined' && settingsCookie["bda-es-1"]) {
- if (emotesFfz.hasOwnProperty(sWord)) {
+ if (typeof emotesFfz !== 'undefined' && settingsCookie["bda-es-1"]) {
+ //only skip ffz if there is a bttv emote for it
+ if(!skipffz || !emotesBTTV2.hasOwnProperty(sWord)){
+ if (emotesFfz.hasOwnProperty(sWord)) {
+ var len = Math.round(sWord.length / 4);
+ var name = sWord.substr(0, len) + "\uFDD9" + sWord.substr(len, len) + "\uFDD9" + sWord.substr(len * 2, len) + "\uFDD9" + sWord.substr(len * 3);
+ var url = ffzEmoteUrlStart + emotesFfz[sWord] + ffzEmoteUrlEnd;
+ parentInnerHTML = parentInnerHTML.replace(word, '');
+ return;
+ }
+ }
+ }
+
+ if (typeof emotesBTTV2 !== 'undefined' && settingsCookie["bda-es-2"]) {
+ if (emotesBTTV2.hasOwnProperty(sWord)) {
var len = Math.round(sWord.length / 4);
var name = sWord.substr(0, len) + "\uFDD9" + sWord.substr(len, len) + "\uFDD9" + sWord.substr(len * 2, len) + "\uFDD9" + sWord.substr(len * 3);
- var url = ffzEmoteUrlStart + emotesFfz[sWord] + ffzEmoteUrlEnd;
+
+ //if bttv emote is forced change its name for fav. and tooltip and to be able to copy them with the mod
+ if (skipffz) name = word.substr(0, len) + "\uFDD9" + word.substr(len, len) + "\uFDD9" + word.substr(len * 2, len) + "\uFDD9" + word.substr(len * 3);
+
+ var url = bttvEmoteUrlStart + emotesBTTV2[sWord] + bttvEmoteUrlEnd;
parentInnerHTML = parentInnerHTML.replace(word, '');
return;
}
diff --git a/js/main.min.js b/js/main.min.js
index e259359d..e5fa679a 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.63,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"},"Show Emotes":{id:"bda-es-7",info:"Show any 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:"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-gs-5":!0,"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:{darkmode:{title:"v1.63 : Dark Mode",text:"Dark mode makes certain elements dark by default(currently only applies to emote menu)",img:""},emotemenu:{title:"v1.62 : Brand new emote menu that fits in Discord emoji menu!",text:"The emote menu has been replaced by a new one that injects itself in the Discord emoji menu!",img:""},cccss:{title:"v1.61 : New custom CSS editor",text:"The custom CSS editor now has options and can be detached!",img:""},vdc:{title:"v1.61 : Voice Disconnect",text:"Disconnect from voice server when closing Discord!",img:""},pslist:{title:"v1.60 : New public server list!",text:'New and shiny public server list powered by DiscordServers.com!',img:""},api:{title:"v1.59 : New plugin api callback",text:"Use the `observer(e)` callback instead of creating your own MutationObserver",img:""},emotemods:{title:"v1.59 : New emote mods!",text:"The following emote mods have been added: :shake2, :shake3, :flap",img:""},minmode:{title:"v1.59: Minimal mode",text:"Minimal mode embed fixed size has been removed",img:""}},fixes:{modal:{title:"v1.62 : Fixed modals",text:"Fixed broken modal introduced by 0.0.287",imt:""},emotes:{title:"v1.59 : Native sub emote mods",text:"Emote mods now work with native sub emotes!",img:""},emotes2:{title:"v1.59 : Emote mods and custom emotes",text:"Emote mods will no longer interfere with custom emotes using :",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 i=($(".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(i),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()}),opublicServers.init(),emoteModule.autoCapitalize(),settingsCookie.version.CodeMirror{ min-width:100%; }"),$("head").append('')}else setTimeout(e,100)}var t=this;if(version 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($(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()),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 i in bdchangelog.fixes)i=bdchangelog.fixes[i],e+="
"+i.title+"
"+i.text+"
";e+="
"}if(null!=bdchangelog.upcoming){e+='
Coming Soon
';for(var s in bdchangelog.upcoming)s=bdchangelog.upcoming[s],e+="
';for(var o in settings){var n=settings[o],a=n.id;"core"==n.cat&&n.implemented&&!n.hidden&&(s+='
"+o+" - "+n.info+"
");
+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.63,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"},"Show Emotes":{id:"bda-es-7",info:"Show any 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:"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-gs-5":!0,"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:{darkmode:{title:"v1.63 : Dark Mode",text:"Dark mode makes certain elements dark by default(currently only applies to emote menu)",img:""},emotemenu:{title:"v1.62 : Brand new emote menu that fits in Discord emoji menu!",text:"The emote menu has been replaced by a new one that injects itself in the Discord emoji menu!",img:""},cccss:{title:"v1.61 : New custom CSS editor",text:"The custom CSS editor now has options and can be detached!",img:""},vdc:{title:"v1.61 : Voice Disconnect",text:"Disconnect from voice server when closing Discord!",img:""},pslist:{title:"v1.60 : New public server list!",text:'New and shiny public server list powered by DiscordServers.com!',img:""},api:{title:"v1.59 : New plugin api callback",text:"Use the `observer(e)` callback instead of creating your own MutationObserver",img:""},emotemods:{title:"v1.59 : New emote mods!",text:"The following emote mods have been added: :shake2, :shake3, :flap",img:""},minmode:{title:"v1.59: Minimal mode",text:"Minimal mode embed fixed size has been removed",img:""}},fixes:{modal:{title:"v1.62 : Fixed modals",text:"Fixed broken modal introduced by 0.0.287",imt:""},emotes:{title:"v1.59 : Native sub emote mods",text:"Emote mods now work with native sub emotes!",img:""},emotes2:{title:"v1.59 : Emote mods and custom emotes",text:"Emote mods will no longer interfere with custom emotes using :",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 i=($(".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(i),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()}),opublicServers.init(),emoteModule.autoCapitalize(),settingsCookie.version.CodeMirror{ min-width:100%; }"),$("head").append('')}else setTimeout(e,100)}var t=this;if(version 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($(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()),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 i in bdchangelog.fixes)i=bdchangelog.fixes[i],e+="
"+i.title+"
"+i.text+"
";e+="
"}if(null!=bdchangelog.upcoming){e+='
Coming Soon
';for(var s in bdchangelog.upcoming)s=bdchangelog.upcoming[s],e+="