From 51f9ba3642b7c609f5fcd465f7172b2103bcae3b Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Wed, 8 Nov 2017 06:40:36 +0100 Subject: [PATCH] Add option to always show character count to edit-design plugin --- Resources/Plugins/edit-design/browser.js | 7 ++++++- Resources/Plugins/edit-design/modal.html | 12 ++++++++---- Resources/Scripts/styles/browser.css | 5 ----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Resources/Plugins/edit-design/browser.js b/Resources/Plugins/edit-design/browser.js index b7bc20a5..3e5199dd 100644 --- a/Resources/Plugins/edit-design/browser.js +++ b/Resources/Plugins/edit-design/browser.js @@ -13,6 +13,7 @@ enabled(){ moveTweetActionsToRight: true, themeColorTweaks: true, revertIcons: true, + showCharacterCount: true, increaseQuoteTextSize: false, smallComposeTextSize: false, optimizeAnimations: true, @@ -378,9 +379,13 @@ enabled(){ } } + if (this.config.showCharacterCount){ + this.css.insert(".js-character-count.is-hidden { display: inline !important }"); + } + if (this.config.hideTweetActions){ this.css.insert(".tweet-action { opacity: 0; }"); - this.css.insert(".tweet-actions.is-visible .tweet-action { opacity: 0.5; }"); + this.css.insert(".tweet-actions.is-visible .tweet-action { opacity: 0.5 }"); this.css.insert(".is-favorite .tweet-action, .is-retweet .tweet-action { opacity: 0.5; visibility: visible !important }"); this.css.insert(".tweet:hover .tweet-action, .tweet-action.is-selected, .is-favorite .tweet-action[rel='favorite'], .is-retweet .tweet-action[rel='retweet'] { opacity: 1 !important; visibility: visible !important }"); } diff --git a/Resources/Plugins/edit-design/modal.html b/Resources/Plugins/edit-design/modal.html index 66c4bde7..790960dc 100644 --- a/Resources/Plugins/edit-design/modal.html +++ b/Resources/Plugins/edit-design/modal.html @@ -92,14 +92,18 @@ <label class="txt-uppercase touch-larger-label"> <b>Design</b> </label> - <label class="checkbox"> - <input data-td-key="themeColorTweaks" class="js-theme-checkbox touch-larger-label" type="checkbox"> - Theme color tweaks - </label> <label class="checkbox"> <input data-td-key="revertIcons" class="js-theme-checkbox touch-larger-label" type="checkbox"> Revert icon design </label> + <label class="checkbox"> + <input data-td-key="showCharacterCount" class="js-theme-checkbox touch-larger-label" type="checkbox"> + Always show character count + </label> + <label class="checkbox"> + <input data-td-key="themeColorTweaks" class="js-theme-checkbox touch-larger-label" type="checkbox"> + Theme color tweaks + </label> <!-- ADVANCED --> diff --git a/Resources/Scripts/styles/browser.css b/Resources/Scripts/styles/browser.css index fb92cee1..108b8355 100644 --- a/Resources/Scripts/styles/browser.css +++ b/Resources/Scripts/styles/browser.css @@ -129,11 +129,6 @@ a[data-full-url] { word-break: break-all; } -.character-count-compose { - /* fix strangely wide character count element */ - width: 40px !important; -} - .is-video a:not([href*='youtu']) .icon-bg-dot, .is-gif .icon-bg-dot { /* change play icon on mp4s */ color: #9f51cf;