Skip to content

Commit

Permalink
#2110 typo & does "ad-showing" still work? #1504 #1491
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Apr 2, 2024
1 parent c31aaa8 commit 28a7fad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,15 @@ ImprovedTube.playerOnEnded = function (event) {

ImprovedTube.onkeydown = function () {
window.addEventListener('keydown', function () {
if (ImprovedTube.elements.player && ImprovedTube.elements.player.classList.contains('ad-showing')) {
if (ImprovedTube.elements.player && ImprovedTube.elements.player.classList.contains('ad-showing') === false) {
ImprovedTube.user_interacted = true;
}
}, true);
};

ImprovedTube.onmousedown = function (event) {
window.addEventListener('mousedown', function (event) {
if (ImprovedTube.elements.player && ImprovedTube.elements.player.classList.contains('ad-showing')) {
if (ImprovedTube.elements.player && ImprovedTube.elements.player.classList.contains('ad-showing') === false) {
var path = event.composedPath();

for (var i = 0, l = path.length; i < l; i++) {
Expand Down
10 changes: 6 additions & 4 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,12 @@ ImprovedTube.playerScreenshotButton = function () {
REPEAT
-------------------------------------------------------------------------------*/
ImprovedTube.playerRepeat = function () {
setTimeout(function () {
ImprovedTube.elements.video.setAttribute('loop', '');
setTimeout(function () {
if (!/ad-showing/.test(ImprovedTube.elements.player.className) {
ImprovedTube.elements.video.setAttribute('loop', '');
}
//ImprovedTube.elements.buttons['it-repeat-styles'].style.opacity = '1'; //old class from version 3.x? that both repeat buttons could have
}, 200);
}, 200);
}
/*------------------------------------------------------------------------------
REPEAT BUTTON
Expand Down Expand Up @@ -1296,4 +1298,4 @@ ImprovedTube.miniPlayer = function () {
window.removeEventListener('scroll', this.miniPlayer_scroll);
window.removeEventListener('mousemove', this.miniPlayer_cursorUpdate);
}
};
};

0 comments on commit 28a7fad

Please sign in to comment.