diff --git a/_locales/am/messages.json b/_locales/am/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/am/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json index 0975b8bea..ffb168d4b 100644 --- a/_locales/ar/messages.json +++ b/_locales/ar/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "المنصة" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "تشغيل / ايقاف" }, diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/bg/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/bn/messages.json b/_locales/bn/messages.json index 5c4951f2d..c6cd5ab88 100644 --- a/_locales/bn/messages.json +++ b/_locales/bn/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "প্ল্যাটফর্ম" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "খেলার / বিরতি" }, diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/ca/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/cs/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/da/messages.json b/_locales/da/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/da/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 84c69593a..dd48efc61 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Plattform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Play / Pause" }, @@ -989,4 +992,4 @@ "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube begrenzt die Qualität auf 1080p für den h.264 Codec" } -} +} \ No newline at end of file diff --git a/_locales/el/messages.json b/_locales/el/messages.json index 212b763a8..7b8a32ff3 100644 --- a/_locales/el/messages.json +++ b/_locales/el/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Πλατφόρμα" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Play / Pause" }, diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 0d69d3877..e93a10ecf 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Platform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Play / Pause" }, diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 6e3f2bf93..d740d6ed8 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Plataforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Reproducir / pausar" }, diff --git a/_locales/et/messages.json b/_locales/et/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/et/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/fa/messages.json b/_locales/fa/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/fa/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/fi/messages.json b/_locales/fi/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/fi/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/fil/messages.json b/_locales/fil/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/fil/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 670ae54cb..e63194bfc 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -656,6 +656,9 @@ "platform": { "message": "Platforme" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Lire / Pause" }, diff --git a/_locales/gu/messages.json b/_locales/gu/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/gu/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/he/messages.json b/_locales/he/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/he/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/hi/messages.json b/_locales/hi/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/hi/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/hin/messages.json b/_locales/hin/messages.json index d6f30563f..c7fb7f379 100644 --- a/_locales/hin/messages.json +++ b/_locales/hin/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "मंच" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "प्ले / ठहराव" }, diff --git a/_locales/hr/messages.json b/_locales/hr/messages.json index d424e8235..6658851ed 100644 --- a/_locales/hr/messages.json +++ b/_locales/hr/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Platforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Reprodukcija / pauza" }, diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/hu/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/id/messages.json b/_locales/id/messages.json index b0876efdd..cfb3d79c1 100644 --- a/_locales/id/messages.json +++ b/_locales/id/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Platform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Mulai / Jeda" }, diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 8cf926ce7..37ba24a1a 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Piattaforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Avvio/Pausa" }, @@ -986,4 +989,4 @@ "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube limita la qualità video a 1080p per il codec h.264" } -} +} \ No newline at end of file diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 50ecce070..3a0349302 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "プラットフォーム" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "再生/一時停止" }, diff --git a/_locales/kn/messages.json b/_locales/kn/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/kn/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index 3560eae45..9ba1ca5b5 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "플랫폼" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "재생 / 일시정지" }, diff --git a/_locales/lt/messages.json b/_locales/lt/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/lt/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/lv/messages.json b/_locales/lv/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/lv/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/ml/messages.json b/_locales/ml/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/ml/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/mr/messages.json b/_locales/mr/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/mr/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/ms/messages.json b/_locales/ms/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/ms/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/nb_NO/messages.json b/_locales/nb_NO/messages.json index e0b831464..0952a91e4 100644 --- a/_locales/nb_NO/messages.json +++ b/_locales/nb_NO/messages.json @@ -656,6 +656,9 @@ "platform": { "message": "Plattform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Spill / Pause" }, diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index 9eba29035..5323daf94 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Platform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Video afspelen/pauzeren" }, diff --git a/_locales/no/messages.json b/_locales/no/messages.json index 5e7bdb16a..9f022b371 100644 --- a/_locales/no/messages.json +++ b/_locales/no/messages.json @@ -650,6 +650,9 @@ "platform": { "message": "Plattform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Spill / Pause" }, diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index 9d1634736..dfb0fd319 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Platforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Odtwarzanie / Pauza" }, diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json index 48adae76f..8508e773f 100644 --- a/_locales/pt_BR/messages.json +++ b/_locales/pt_BR/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Plataforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Reproduzir / Pausar" }, @@ -874,7 +877,7 @@ }, "thisWillRemoveAllCookies": { "message": "Todos os Cookies Serão Removidos." - }, + }, "thisWillRemoveAllWatchedVideos": { "message": "Isto irá Remover Todos Assistiram a Vídeos." }, @@ -998,4 +1001,4 @@ "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "O YouTube limita o codec h.264 à resolução de 1080p" } -} +} \ No newline at end of file diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index dac319d6e..72261c0f2 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Plataforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Reproduzir / Pausar" }, diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json index 4915ebbac..688ee0114 100644 --- a/_locales/ro/messages.json +++ b/_locales/ro/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Platformă" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Redă / Pauză" }, diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 2b9353ab0..1c7c4d09d 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "Платформа" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Играть / Пауза" }, @@ -995,4 +998,4 @@ "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube ограничивает качетво видео до 1080p для кодека H.264" } -} +} \ No newline at end of file diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json index d8d8ee78d..ddb5b80f3 100644 --- a/_locales/sk/messages.json +++ b/_locales/sk/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Platforma" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Prehrať / Pozastavť" }, diff --git a/_locales/sl/messages.json b/_locales/sl/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/sl/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/sr/messages.json b/_locales/sr/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/sr/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/sv/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/sw/messages.json b/_locales/sw/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/sw/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/ta/messages.json b/_locales/ta/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/ta/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/te/messages.json b/_locales/te/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/te/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/th/messages.json b/_locales/th/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/th/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json index afd7307cb..5d500e081 100644 --- a/_locales/tr/messages.json +++ b/_locales/tr/messages.json @@ -653,6 +653,9 @@ "platform": { "message": "Platform" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "Oynat / Duraklat" }, @@ -989,4 +992,4 @@ "youtubeLimitsVideoQualityTo1080pForH264Codec": { "message": "YouTube, h.264 codec bileşeni için video kalitesini 1080p ile sınırlar" } -} +} \ No newline at end of file diff --git a/_locales/uk/messages.json b/_locales/uk/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/uk/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/vi/messages.json b/_locales/vi/messages.json new file mode 100644 index 000000000..0cafec745 --- /dev/null +++ b/_locales/vi/messages.json @@ -0,0 +1,5 @@ +{ + "playAllButton": { + "message": "\"Play all\" button" + } +} \ No newline at end of file diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 235fd1674..4699c6d77 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -659,6 +659,9 @@ "platform": { "message": "平台" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "播放/暂停" }, diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index 840077aa8..244941b3e 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -656,6 +656,9 @@ "platform": { "message": "平台" }, + "playAllButton": { + "message": "\"Play all\" button" + }, "playPause": { "message": "播放/暫停" }, diff --git a/content-styles.css b/content-styles.css index f2a445988..923206af8 100644 --- a/content-styles.css +++ b/content-styles.css @@ -66,7 +66,8 @@ 5.0 Playlist 5.1 Reverse 6.0 Channel - 6.1 Featured content + 6.1 "Play all" button + 6.2 Featured content 7.0 Shortcuts 8.0 Settings 8.1 ImprovedTube icon on YouTube @@ -2843,7 +2844,34 @@ html[it-player-remote-button=true] .ytp-remote-button ------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ -6.1 FEATURED CONTENT +6.1 PLAY ALL BUTTON +------------------------------------------------------------------------------*/ + +.it-play-all-button { + font-size: 14px !important; + font-weight: 500 !important; + display: flex !important; + box-sizing: border-box !important; + height: 36px !important; + padding: 6px 36px !important; + cursor: pointer !important; + text-transform: uppercase !important; + color: var(--yt-button-color, var(--yt-spec-text-secondary)) !important; + align-items: center !important; + justify-content: center !important; + text-decoration: none !important; +} + +.it-play-all-button svg { + width: 24px !important; + height: 24px !important; + margin: 0 8px 0 0 !important; + fill: currentColor !important; +} + + +/*------------------------------------------------------------------------------ +6.2 FEATURED CONTENT ------------------------------------------------------------------------------*/ html[it-channel-hide-featured-content=true] #secondary #contents.style-scope.ytd-browse-secondary-contents-renderer, diff --git a/manifest.json b/manifest.json index 88f6191b1..789349277 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "'Improve YouTube!' (Video & YouTube Tools)🎧", "short_name": "ImprovedTube", "description": "__MSG_description_ext__", - "version": "3.912", + "version": "3.913", "default_locale": "en", "icons": { "128": "icons/128.png", diff --git a/ui/script.js b/ui/script.js index a9b0b2611..9c3026fa4 100644 --- a/ui/script.js +++ b/ui/script.js @@ -4873,6 +4873,10 @@ var skeleton = { text: 'trailerAutoplay', value: true }, + channel_play_all_button: { + component: 'switch', + text: 'playAllButton' + }, channel_hide_featured_content: { component: 'switch', text: 'hideFeaturedContent' diff --git a/youtube-scripts.js b/youtube-scripts.js index b937af5cb..dfaf176db 100644 --- a/youtube-scripts.js +++ b/youtube-scripts.js @@ -60,6 +60,7 @@ 4.5.4 Shuffle 4.6.0 Channel 4.6.1 Default channel tab + 4.6.2 "Play all" button 4.7.0 Shortcuts 4.7.1 Quality 4.7.2 Picture in Picture @@ -3000,6 +3001,59 @@ ImprovedTube.channelDefaultTab = function (a) { } }; +/*------------------------------------------------------------------------------ +4.6.2 PLAY ALL BUTTON +------------------------------------------------------------------------------*/ + +ImprovedTube.channelPlayAllButton = function () { + if (this.storage.channel_play_all_button === true) { + if (/\/(channel|user|c)\/[^/]+\/videos/.test(location.href)) { + var container = document.querySelector('ytd-channel-sub-menu-renderer #primary-items'); + + if (!this.elements.playAllButton) { + var button = document.createElement('a'), + svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'), + path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); + + button.className = 'it-play-all-button'; + + svg.setAttributeNS(null, 'viewBox', '0 0 24 24'); + path.setAttributeNS(null, 'd', 'M6,4l12,8L6,20V4z'); + + svg.appendChild(path); + button.appendChild(svg); + button.appendChild(document.createTextNode('Play all')); + + this.elements.playAllButton = button; + + if (container) { + container.appendChild(button); + } + } else if (container) { + container.appendChild(this.elements.playAllButton); + } + } else if (this.elements.playAllButton) { + this.elements.playAllButton.remove(); + } + + if (this.elements.playAllButton) { + var app = document.querySelector('ytd-app'); + + if ( + app && + app.__data && + app.__data.data && + app.__data.data.response && + app.__data.data.response.metadata && + app.__data.data.response.metadata.channelMetadataRenderer && + app.__data.data.response.metadata.channelMetadataRenderer.externalId + ) { + this.elements.playAllButton.href = '/playlist?list=UU' + app.__data.data.response.metadata.channelMetadataRenderer.externalId.substring(2); + } + } + } +}; + /*------------------------------------------------------------------------------ 4.7.0 SHORTCUTS @@ -4164,6 +4218,8 @@ document.addEventListener('yt-navigate-finish', function () { ImprovedTube.videoPageUpdate(); ImprovedTube.initPlayer(); } + + ImprovedTube.channelPlayAllButton(); }); document.addEventListener('yt-page-data-updated', function (event) {