use current location for channel download url

This commit is contained in:
Simon 2023-09-03 11:20:31 +07:00
parent ad2a6f3693
commit fd87615cdc
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -280,10 +280,9 @@ function buildChannelDownloadButton() {
channelDownloadButton.title = `TA download video: ${videoId}`; channelDownloadButton.title = `TA download video: ${videoId}`;
checkVideoExists(channelDownloadButton); checkVideoExists(channelDownloadButton);
} else { } else {
let toDownload = urlObj.pathname.slice(1); channelDownloadButton.setAttribute('data-id', currentLocation);
channelDownloadButton.setAttribute('data-id', toDownload);
channelDownloadButton.setAttribute('data-type', 'channel'); channelDownloadButton.setAttribute('data-type', 'channel');
channelDownloadButton.title = `TA download channel ${toDownload}`; channelDownloadButton.title = `TA download channel ${currentLocation}`;
} }
channelDownloadButton.innerHTML = downloadIcon; channelDownloadButton.innerHTML = downloadIcon;
channelDownloadButton.addEventListener('click', e => { channelDownloadButton.addEventListener('click', e => {