diff --git a/js&css/extension/www.youtube.com/appearance/player/player.css b/js&css/extension/www.youtube.com/appearance/player/player.css index 9044cd9be..fab70daa4 100644 --- a/js&css/extension/www.youtube.com/appearance/player/player.css +++ b/js&css/extension/www.youtube.com/appearance/player/player.css @@ -578,3 +578,9 @@ html[it-player-hide-skip-overlay=true] .ytp-doubletap-ui, .ytp-doubletap-ui-lega { visibility: hidden; } +/*-------------------------------------------------------------- +# HIDE VIDEO TITLE IN FULLSCREEN +--------------------------------------------------------------*/ +html[it-hide-video-title-fullScreen='true'] .ytp-title-text > a { + display: none !important; +} \ No newline at end of file diff --git a/js&css/web-accessible/core.js b/js&css/web-accessible/core.js index 3a1ef24bb..9703d1b3b 100644 --- a/js&css/web-accessible/core.js +++ b/js&css/web-accessible/core.js @@ -260,8 +260,7 @@ document.addEventListener('it-message-from-extension', function () { if (ImprovedTube.storage.player_remaining_duration === false) {document.querySelector(".ytp-time-remaining-duration")?.remove();} if (ImprovedTube.storage.player_remaining_duration === true) { ImprovedTube.playerRemainingDuration(); } } else if ( camelized_key === 'hideVideoTitleFullScreen' ) { - if (ImprovedTube.storage.hide_video_title_fullScreen === false) {document.querySelector(".ytp-title-text > a")?.style.setProperty('display', 'block');} - if (ImprovedTube.storage.hide_video_title_fullScreen === true) {document.querySelector(".ytp-title-text > a")?.style.setProperty('display', 'none'); } + document.documentElement.toggleAttribute('it-hide_video_title_fullScreen'); } if (ImprovedTube[camelized_key]) { try{ImprovedTube[camelized_key]()}catch{}; diff --git a/js&css/web-accessible/functions.js b/js&css/web-accessible/functions.js index e8a72582e..ca098f512 100644 --- a/js&css/web-accessible/functions.js +++ b/js&css/web-accessible/functions.js @@ -363,7 +363,6 @@ ImprovedTube.initPlayer = function () { ImprovedTube.playerFitToWinButton(); ImprovedTube.playerHamburgerButton(); ImprovedTube.playerControls(); - ImprovedTube.hideVideoTitleFullScreen(); setTimeout(function () { ImprovedTube.forcedTheaterMode(); diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index ff7cbbdff..0d8ec9776 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -848,13 +848,6 @@ ImprovedTube.playerControls = function (pause=false) { }} else { player.showControls(); } } }; -/*-------------------------------------------------------------- -# HIDE VIDEO TITLE IN FULLSCREEN ---------------------------------------------------------------*/ -ImprovedTube.hideVideoTitleFullScreen = function (){ if (ImprovedTube.storage.hide_video_title_fullScreen === true) { - document.addEventListener('fullscreenchange', function (){ document.querySelector(".ytp-title-text > a")?.style.setProperty('display', 'none'); - }) -}}; /*------------------------------------------------------------------------------ CUSTOM MINI-PLAYER ------------------------------------------------------------------------------*/ diff --git a/js&css/web-accessible/www.youtube.com/shortcuts.js b/js&css/web-accessible/www.youtube.com/shortcuts.js index 1d14d431f..0584ec5fc 100644 --- a/js&css/web-accessible/www.youtube.com/shortcuts.js +++ b/js&css/web-accessible/www.youtube.com/shortcuts.js @@ -705,11 +705,15 @@ ImprovedTube.shortcutStatsForNerds = function () { 4.7.28 TOGGLE CARDS ------------------------------------------------------------------------------*/ -ImprovedTube.shortcutToggleCards = function () { +ImprovedTube.shortcutToggleCards = function () { function toggleVideoOverlays() { document.documentElement.toggleAttribute('it-player-hide-cards'); + + document.documentElement.toggleAttribute('it-player-hide-endcards'); + document.documentElement.toggleAttribute('it-hide_video_title_fullScreen');} + + toggleVideoOverlays(); window.removeEventListener('hashchange', toggleVideoOverlays); window.addEventListener('hashchange', toggleVideoOverlays); }; - /*------------------------------------------------------------------------------ 4.7.29 POPUP PLAYER ------------------------------------------------------------------------------*/