fix: fixed an issue with the download button disappearing

- resolve #1551
This commit is contained in:
JellyBrick
2023-12-28 02:08:03 +09:00
parent 8aeae45965
commit e67699fed5

View File

@ -33,7 +33,7 @@ const menuObserver = new MutationObserver(() => {
}
const menuUrl = document.querySelector<HTMLAnchorElement>(
'tp-yt-paper-listbox [tabindex="-1"] #navigation-endpoint',
'tp-yt-paper-listbox [tabindex="0"] #navigation-endpoint',
)?.href;
if (!menuUrl?.includes('watch?') && doneFirstLoad) {
return;
@ -56,7 +56,7 @@ export const onRendererLoad = ({
let videoUrl = getSongMenu()
// Selector of first button which is always "Start Radio"
?.querySelector(
'ytmusic-menu-navigation-item-renderer[tabindex="-1"] #navigation-endpoint',
'ytmusic-menu-navigation-item-renderer[tabindex="0"] #navigation-endpoint',
)
?.getAttribute('href');
if (videoUrl) {