Skip to content

Commit

Permalink
Update functions.js catch html5-video-container, not just html5-main-…
Browse files Browse the repository at this point in the history
…video
  • Loading branch information
raszpl authored Apr 20, 2024
1 parent bea69b0 commit 75e2b30
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,16 @@ ImprovedTube.onkeydown = function () {
ImprovedTube.onmousedown = function (event) {
window.addEventListener('mousedown', function (event) {
if (ImprovedTube.elements.player && ImprovedTube.elements.player.classList.contains('ad-showing') === false) {
ImprovedTube.user_interacted = true;
var path = event.composedPath();

for (var i = 0, l = path.length; i < l; i++) {
if (path[i].className
&& path[i].className.indexOf
&& (path[i].className.indexOf('html5-video-container') !== -1
|| path[i].className.indexOf('ytp-play-button') !== -1)) {
ImprovedTube.user_interacted = true;
}
}
}
}, true);
};
Expand Down

0 comments on commit 75e2b30

Please sign in to comment.