Skip to content

Commit

Permalink
Please Fix: player.parentNode doesnt exist on youtube.com/shorts
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Nov 7, 2023
1 parent b5b821b commit 0536c9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js&css/web-accessible/www.youtube.com/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ ImprovedTube.shortcuts = function () {
});

document.addEventListener('improvedtube-player-loaded', function () {
ImprovedTube.elements.player.parentNode.addEventListener('mouseover', function () {
//Please Fix: November2023: this parentNode doesnt exist on youtube.com/shorts
ImprovedTube.elements.player.parentNode?.addEventListener('mouseover', function () {
mouse.player = true;
mouse.wheel = 0;
}, true);

ImprovedTube.elements.player.parentNode.addEventListener('mouseout', function () {
ImprovedTube.elements.player.parentNode?.addEventListener('mouseout', function () {
mouse.player = false;
mouse.wheel = 0;
}, true);
Expand Down

0 comments on commit 0536c9b

Please sign in to comment.