fix download button showing when it shouldn't

This commit is contained in:
Araxeus
2023-03-04 13:39:49 +02:00
parent 2cbc73d2ed
commit a31e59fbc7

View File

@ -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");