mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
fix: fixed an issue with the download button disappearing
- resolve #1551
This commit is contained in:
@ -33,7 +33,7 @@ const menuObserver = new MutationObserver(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const menuUrl = document.querySelector<HTMLAnchorElement>(
|
const menuUrl = document.querySelector<HTMLAnchorElement>(
|
||||||
'tp-yt-paper-listbox [tabindex="-1"] #navigation-endpoint',
|
'tp-yt-paper-listbox [tabindex="0"] #navigation-endpoint',
|
||||||
)?.href;
|
)?.href;
|
||||||
if (!menuUrl?.includes('watch?') && doneFirstLoad) {
|
if (!menuUrl?.includes('watch?') && doneFirstLoad) {
|
||||||
return;
|
return;
|
||||||
@ -56,7 +56,7 @@ export const onRendererLoad = ({
|
|||||||
let videoUrl = getSongMenu()
|
let videoUrl = getSongMenu()
|
||||||
// Selector of first button which is always "Start Radio"
|
// Selector of first button which is always "Start Radio"
|
||||||
?.querySelector(
|
?.querySelector(
|
||||||
'ytmusic-menu-navigation-item-renderer[tabindex="-1"] #navigation-endpoint',
|
'ytmusic-menu-navigation-item-renderer[tabindex="0"] #navigation-endpoint',
|
||||||
)
|
)
|
||||||
?.getAttribute('href');
|
?.getAttribute('href');
|
||||||
if (videoUrl) {
|
if (videoUrl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user