From 659dc085fda259de3b3a6245780cbcf14b70a2b6 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Sat, 9 Apr 2016 22:56:29 +0300 Subject: [PATCH] Separate core settings from emote settings --- js/main.js | 90 ++++++++++++++++++++++++++++++++------------------ js/main.min.js | 9 ++--- 2 files changed, 63 insertions(+), 36 deletions(-) diff --git a/js/main.js b/js/main.js index bb7b5b3d..7ef6aa04 100644 --- a/js/main.js +++ b/js/main.js @@ -21,25 +21,26 @@ var bttvEmoteUrlEnd = "/1x"; var mainCore; var settings = { - "Save logs locally": { "id": "bda-gs-0", "info": "Saves chat logs locally", "implemented": false, "hidden": false}, - "Public Servers": { "id": "bda-gs-1", "info": "Display public servers button", "implemented": true, "hidden": false}, - "Minimal Mode": { "id": "bda-gs-2", "info": "Hide elements and reduce the size of elements.", "implemented": true, "hidden": false}, - "Voice Mode": { "id": "bda-gs-4", "info": "Only show voice chat", "implemented": true, "hidden": false}, - "Hide Channels": { "id": "bda-gs-3", "info": "Hide channels in minimal mode", "implemented": true, "hidden": false}, - "Dark Mode": { "id": "bda-gs-5", "info": "Make certain elements dark by default(wip)", "implemented": true, "hidden": false}, - "Emote Menu": { "id": "bda-es-0", "info": "Show Twitch/Favourite emotes in emote menu", "implemented": true, "hidden": false}, - "Emoji Menu": { "id": "bda-es-9", "info": "Show/Hide Discord emoji menu", "implemented": true, "hidden": false}, - "Show Emotes": { "id": "bda-es-7", "info": "Show any emotes", "implemented": true, "hidden": false}, - "FrankerFaceZ Emotes": { "id": "bda-es-1", "info": "Show FrankerFaceZ Emotes", "implemented": true, "hidden": false}, - "BetterTTV Emotes": { "id": "bda-es-2", "info": "Show BetterTTV Emotes", "implemented": true, "hidden": false}, - "Emote Autocomplete": { "id": "bda-es-3", "info": "Autocomplete emote commands", "implemented": false, "hidden": false}, - "Emote Auto Capitalization": { "id": "bda-es-4", "info": "Autocapitalize emote commands", "implemented": true, "hidden": false}, - "Override Default Emotes": { "id": "bda-es-5", "info": "Override default emotes", "implemented": false, "hidden": false}, - "Show Names": { "id": "bda-es-6", "info": "Show emote names on hover", "implemented": true, "hidden": false}, - "Show emote modifiers": { "id": "bda-es-8", "info": "Enable/Disable emote mods", "implemented": true, "hidden": false}, - "Voice Disconnect": { "id": "bda-dc-0", "info": "Disconnect from voice server when closing Discord", "implemented": true, "hidden": false}, - "Custom css live update": { "id": "bda-css-0", "info": "", "implemented": true, "hidden": true }, - "Custom css auto udpate": { "id": "bda-css-1", "info": "", "implemented": true, "hidden": true }, + "Save logs locally": { "id": "bda-gs-0", "info": "Saves chat logs locally", "implemented": false, "hidden": false, "cat": "core"}, + "Public Servers": { "id": "bda-gs-1", "info": "Display public servers button", "implemented": true, "hidden": false, "cat": "core"}, + "Minimal Mode": { "id": "bda-gs-2", "info": "Hide elements and reduce the size of elements.", "implemented": true, "hidden": false, "cat": "core"}, + "Voice Mode": { "id": "bda-gs-4", "info": "Only show voice chat", "implemented": true, "hidden": false, "cat": "core"}, + "Hide Channels": { "id": "bda-gs-3", "info": "Hide channels in minimal mode", "implemented": true, "hidden": false, "cat": "core"}, + "Dark Mode": { "id": "bda-gs-5", "info": "Make certain elements dark by default(wip)", "implemented": true, "hidden": false, "cat": "core"}, + "Override Default Emotes": { "id": "bda-es-5", "info": "Override default emotes", "implemented": false, "hidden": false, "cat": "core"}, + "Voice Disconnect": { "id": "bda-dc-0", "info": "Disconnect from voice server when closing Discord", "implemented": true, "hidden": false, "cat": "core"}, + "Custom css live update": { "id": "bda-css-0", "info": "", "implemented": true, "hidden": true , "cat": "core"}, + "Custom css auto udpate": { "id": "bda-css-1", "info": "", "implemented": true, "hidden": true , "cat": "core"}, + + "Show Emotes": { "id": "bda-es-7", "info": "Show any emotes", "implemented": true, "hidden": false, "cat": "emote"}, + "FrankerFaceZ Emotes": { "id": "bda-es-1", "info": "Show FrankerFaceZ Emotes", "implemented": true, "hidden": false, "cat": "emote"}, + "BetterTTV Emotes": { "id": "bda-es-2", "info": "Show BetterTTV Emotes", "implemented": true, "hidden": false, "cat": "emote"}, + "Emote Menu": { "id": "bda-es-0", "info": "Show Twitch/Favourite emotes in emote menu", "implemented": true, "hidden": false, "cat": "emote"}, + "Emoji Menu": { "id": "bda-es-9", "info": "Show Discord emoji menu", "implemented": true, "hidden": false, "cat": "emote"}, + "Emote Autocomplete": { "id": "bda-es-3", "info": "Autocomplete emote commands", "implemented": false, "hidden": false, "cat": "emote"}, + "Emote Auto Capitalization": { "id": "bda-es-4", "info": "Autocapitalize emote commands", "implemented": true, "hidden": false, "cat": "emote"}, + "Show Names": { "id": "bda-es-6", "info": "Show emote names on hover", "implemented": true, "hidden": false, "cat": "emote"}, + "Show emote modifiers": { "id": "bda-es-8", "info": "Enable emote mods", "implemented": true, "hidden": false, "cat": "emote"}, }; var links = { @@ -1258,12 +1259,6 @@ SettingsPanel.prototype.changeTab = function (tab) { customCssInitialized = true; } break; - case "bd-plugins-tab": - - break; - case "bd-themes-tab": - controlGroups.html("Coming soon"); - break; } }; @@ -1329,7 +1324,7 @@ SettingsPanel.prototype.updateSetting = function (checkbox) { }); } else { $(document).off('mouseover', '.emote'); - } + } mainCore.saveSettings(); }; @@ -1349,7 +1344,8 @@ SettingsPanel.prototype.construct = function () { '
' + '
' + '
' + - '
Settings
' + + '
Core
' + + '
Emotes
' + '
Custom CSS
' + '
Plugins
' + '
Themes
' + @@ -1358,12 +1354,11 @@ SettingsPanel.prototype.construct = function () { ' '; + + + settingsInner += ''; + + var ccss = atob(localStorage.getItem("bdcustomcss")); customCssEditor.applyCustomCss(ccss, true, false); - settingsInner += '' + - '
' + - '' + + settingsInner += '' + '