From 52aacf602d77c1e7faddb89f737f9d56a8eac0e3 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Fri, 16 Jun 2017 18:30:36 +0200 Subject: [PATCH] Tweak formatting of edit-design plugin --- Resources/Plugins/edit-design/browser.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Resources/Plugins/edit-design/browser.js b/Resources/Plugins/edit-design/browser.js index 26a4f834..3278f313 100644 --- a/Resources/Plugins/edit-design/browser.js +++ b/Resources/Plugins/edit-design/browser.js @@ -528,20 +528,25 @@ enabled(){ default: TD.settings.setFontSize(parseInt(this.config.fontSize, 10) >= 16 ? "largest" : "smallest"); break; } - $TDP.injectIntoNotificationsBefore(this.$token, "css", "</head>", [ - "<style type='text/css'>", - ".txt-base-smallest:not(.icon), .txt-base-largest:not(.icon) { font-size: "+this.config.fontSize+" !important }", - ".avatar { border-radius: "+this.config.avatarRadius+"% !important }", - (this.config.revertReplies ? ".activity-header + .tweet .tweet-context { margin-left: -35px } .activity-header + .tweet .tweet-context .obj-left { margin-right: 5px }" : ""), - (this.config.revertIcons ? ` + $TDP.injectIntoNotificationsBefore(this.$token, "css", "</head>", ` +<style type='text/css'> +.txt-base-smallest:not(.icon), .txt-base-largest:not(.icon) { font-size: ${this.config.fontSize} !important } +.avatar { border-radius: ${this.config.avatarRadius}% !important } + +${this.config.revertReplies ? ` +.activity-header + .tweet .tweet-context { margin-left: -35px } +.activity-header + .tweet .tweet-context .obj-left { margin-right: 5px } +` : ``} + +${this.config.revertIcons ? ` @font-face { font-family: 'tweetdeckold'; src: url(\"https://ton.twimg.com/tweetdeck-web/web/assets/fonts/tweetdeck-regular-webfont.5f4ea87976.woff\") format(\"woff\"); font-weight: normal; font-style: normal } .icon-reply:before{content:"\\f006";font-family:tweetdeckold} .icon-favorite:before{content:"\\f055";font-family:tweetdeckold} .icon-retweet:before{content:"\\f008";font-family:tweetdeckold} .icon-follow:before{content:"\\f035";font-family:tweetdeckold} -.icon-user-dd:before{content:"\\f01a";font-family:tweetdeckold}` : ""), - "</style>" - ].join("")); +.icon-user-dd:before{content:"\\f01a";font-family:tweetdeckold} +` : ``} +</style>`); }; this.uiShowActionsMenuEvent = () => {