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 100d1b3 commit 439656f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js&css/web-accessible/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ document.addEventListener('it-message-from-extension', function () {
} else if ( camelized_key === 'playerRemainingDuration' ) {
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'); }
}
if (ImprovedTube[camelized_key]) {
try{ImprovedTube[camelized_key]()}catch{};
Expand Down
7 changes: 7 additions & 0 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,13 @@ 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

0 comments on commit 439656f

Please sign in to comment.