downloader lint&refactor

This commit is contained in:
Araxeus
2022-01-12 09:49:27 +02:00
parent c7e793b66e
commit 74f61a532d
2 changed files with 19 additions and 14 deletions

View File

@ -45,7 +45,7 @@ global.download = () => {
let metadata;
let videoUrl = getSongMenu()
// selector of first button which is always "Start Radio"
?.querySelector('ytmusic-menu-navigation-item-renderer.iron-selected[tabindex="0"] #navigation-endpoint')
?.querySelector('ytmusic-menu-navigation-item-renderer[tabindex="0"] #navigation-endpoint')
?.getAttribute("href");
if (videoUrl) {
if (videoUrl.startsWith('watch?')) {