From a31e59fbc70cb23b4572b88fde33754e88ff3407 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Sat, 4 Mar 2023 13:39:49 +0200 Subject: [PATCH] fix download button showing when it shouldn't --- plugins/downloader/front.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/downloader/front.js b/plugins/downloader/front.js index 3e50a743..d5cc19f2 100644 --- a/plugins/downloader/front.js +++ b/plugins/downloader/front.js @@ -18,7 +18,7 @@ const observer = new MutationObserver(() => { } if (menu.contains(downloadButton)) return; const menuUrl = document.querySelector('tp-yt-paper-listbox [tabindex="0"] #navigation-endpoint')?.href; - if (menuUrl && !menuUrl.includes('watch?')) return; + if (!menuUrl?.includes('watch?')) return; menu.prepend(downloadButton); progress = document.querySelector("#ytmcustom-download");