Skip to content

Commit

Permalink
Update player.js dont hide when over timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored Jun 15, 2024
1 parent 34dbe04 commit 5dc87e6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,12 +994,19 @@ ImprovedTube.playerControls = function () {
player.onmouseenter = player.showControls;
player.onmouseleave = player.hideControls;
player.onmousemove = (function() {
let thread;
let thread,
onmousestop = function() {
if (document.querySelector(".ytp-progress-bar:hover")) {
thread = setTimeout(onmousestop, 1000);
} else {
player.hideControls();
}
};

return function() {
player.showControls();
clearTimeout(thread);
thread = setTimeout(player.hideControls, 1000);
thread = setTimeout(onmousestop, 1000);
};
})();
return;
Expand Down

0 comments on commit 5dc87e6

Please sign in to comment.