From 882eb16c914eac1e15ad2b966dfb986afb0dd229 Mon Sep 17 00:00:00 2001 From: Priyank Date: Sat, 1 Aug 2020 08:55:04 +0530 Subject: [PATCH] #314 Dislike button configurable from popup & handled using css --- _locales/ar/messages.json | 3 +++ _locales/de/messages.json | 3 +++ _locales/en/messages.json | 3 +++ _locales/es/messages.json | 3 +++ _locales/fr/messages.json | 3 +++ _locales/it/messages.json | 3 +++ _locales/ja/messages.json | 3 +++ _locales/nl/messages.json | 3 +++ _locales/no/messages.json | 3 +++ _locales/pt_BR/messages.json | 3 +++ _locales/pt_PT/messages.json | 3 +++ _locales/ru/messages.json | 3 +++ _locales/sk/messages.json | 3 +++ _locales/tr/messages.json | 3 +++ _locales/zh_CN/messages.json | 3 +++ _locales/zh_TW/messages.json | 3 +++ src/template/js/template-parts/appearance.js | 4 ++++ src/youtube/css/appearance.css | 4 ++++ 18 files changed, 56 insertions(+) diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json index d93e31c44..8a3f292fc 100644 --- a/_locales/ar/messages.json +++ b/_locales/ar/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "يحد اليوتيوب من جودة الفيديو الى ١٠٨٠ لـ الترميز h.264" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 198fe800b..0d935ed3b 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube begrenzt die Qualität auf 1080 Zeilen für den h.264 Codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 228cd3e79..489455b14 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limits video quality to 1080p for h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/es/messages.json b/_locales/es/messages.json index ecd60c06a..d1a4ae3d7 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limits video quality to 1080p for h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index e1989f8f8..845644837 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limits video quality to 1080p for h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 94319a781..eb623af57 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -790,5 +790,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limita la qualità video a 1080p per il codec h.264" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 270520d82..42654770c 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube はH.264コーデックの画質を1080pに制限しています" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index 5f8d55eb6..e72565808 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limiteerd video kwaliteit tot 1080p voor h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/no/messages.json b/_locales/no/messages.json index ff422480b..aac26cc52 100644 --- a/_locales/no/messages.json +++ b/_locales/no/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube begrenser videokvaliteten til 1080p for h.264-kodeken" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json index d3511b9d2..328dcc234 100644 --- a/_locales/pt_BR/messages.json +++ b/_locales/pt_BR/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "O YouTube limita o codec h.264 à resolução de 1080p" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index 8a3bf4e73..011f0fc0c 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -794,5 +794,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "O YouTube limita a qualidade do video em 1080p para o codec h.264" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 050773fb4..c62d31298 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube ограничивает качетво видео до 1080p для кодека h.264" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json index 5cc1eb03b..2019fbc5e 100644 --- a/_locales/sk/messages.json +++ b/_locales/sk/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube obmedzuje kvalitu videa na 1080p pri kodeku h.264" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json index 42cdddeed..b73959cd6 100644 --- a/_locales/tr/messages.json +++ b/_locales/tr/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube, h.264 codec bileşeni için video kalitesini 1080p ile sınırlar" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } \ No newline at end of file diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 8f97d0754..7c1116d5c 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -799,5 +799,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limits video quality to 1080p for h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index fbbbc5317..f09ffe130 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -793,5 +793,8 @@ }, "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limits video quality to 1080p for h.264 codec" + }, + "redDislikeButton": { + "message": "Show dislike button red colour" } } diff --git a/src/template/js/template-parts/appearance.js b/src/template/js/template-parts/appearance.js index 09e791216..f2e22093f 100644 --- a/src/template/js/template-parts/appearance.js +++ b/src/template/js/template-parts/appearance.js @@ -199,6 +199,10 @@ Menu.main.section.appearance = { always_show_progress_bar: { type: 'switch', label: 'alwaysShowProgressBar' + }, + red_dislike_button: { + type: 'switch', + label: 'redDislikeButton' } } }, diff --git a/src/youtube/css/appearance.css b/src/youtube/css/appearance.css index b39f15c1a..9fe830959 100644 --- a/src/youtube/css/appearance.css +++ b/src/youtube/css/appearance.css @@ -569,6 +569,10 @@ html[it-hide-views-count=true] #watch7-views-info > .watch-view-count color: transparent !important; } +[it-red-dislike-button=true] #top-level-buttons > ytd-toggle-button-renderer.style-scope.ytd-menu-renderer.force-icon-button:nth-child(2).style-default-active > a +{ + color: #fc0000 !important; +} /*-----------------------------------------------------------------------------