Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Nov 23, 2023
1 parent 257db41 commit f80bd99
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
6 changes: 6 additions & 0 deletions js&css/extension/www.youtube.com/appearance/player/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 1 addition & 2 deletions js&css/web-accessible/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
1 change: 0 additions & 1 deletion js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ ImprovedTube.initPlayer = function () {
ImprovedTube.playerFitToWinButton();
ImprovedTube.playerHamburgerButton();
ImprovedTube.playerControls();
ImprovedTube.hideVideoTitleFullScreen();

setTimeout(function () {
ImprovedTube.forcedTheaterMode();
Expand Down
7 changes: 0 additions & 7 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------------------------------------------------------------------*/
Expand Down
8 changes: 6 additions & 2 deletions js&css/web-accessible/www.youtube.com/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------------------------------------------------------------------*/
Expand Down

0 comments on commit f80bd99

Please sign in to comment.