From 83e197a22943067c42adebc9ddad90f77ce1a6d6 Mon Sep 17 00:00:00 2001 From: Rasz_pl Date: Sun, 16 Jun 2024 10:29:57 +0200 Subject: [PATCH 1/2] Update general.js disableThumbnailPlayback search page fix https://github.com/code-charity/youtube/issues/2315 --- js&css/extension/www.youtube.com/general/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js&css/extension/www.youtube.com/general/general.js b/js&css/extension/www.youtube.com/general/general.js index b05d2c255..561d1caba 100644 --- a/js&css/extension/www.youtube.com/general/general.js +++ b/js&css/extension/www.youtube.com/general/general.js @@ -517,7 +517,7 @@ extension.features.thumbnailsQuality = function (anything) { --------------------------------------------------------------*/ extension.features.disableThumbnailPlayback = function (event) { if (event instanceof Event) { - if (event.composedPath().some(elem => (elem.matches != null ? elem.matches("#content ytd-rich-item-renderer") : false) + if (event.composedPath().find(elem => (elem.matches != null && elem.matches('#content.ytd-rich-item-renderer, #contents.ytd-item-section-renderer')) )) { event.stopImmediatePropagation(); } From a66054a9aa52ee14f4a49dc2d93e78dbf6afc4bd Mon Sep 17 00:00:00 2001 From: Rasz_pl Date: Mon, 17 Jun 2024 16:27:20 +0200 Subject: [PATCH 2/2] Update general.js --- js&css/extension/www.youtube.com/general/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js&css/extension/www.youtube.com/general/general.js b/js&css/extension/www.youtube.com/general/general.js index 561d1caba..a6a06d4b6 100644 --- a/js&css/extension/www.youtube.com/general/general.js +++ b/js&css/extension/www.youtube.com/general/general.js @@ -517,7 +517,7 @@ extension.features.thumbnailsQuality = function (anything) { --------------------------------------------------------------*/ extension.features.disableThumbnailPlayback = function (event) { if (event instanceof Event) { - if (event.composedPath().find(elem => (elem.matches != null && elem.matches('#content.ytd-rich-item-renderer, #contents.ytd-item-section-renderer')) + if (event.composedPath().some(elem => (elem.matches != null && elem.matches('#content.ytd-rich-item-renderer, #contents.ytd-item-section-renderer')) )) { event.stopImmediatePropagation(); }