From fd87615cdc6225e7a5aa652fdf38ac6b5da4b0be Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 3 Sep 2023 11:20:31 +0700 Subject: [PATCH] use current location for channel download url --- extension/script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extension/script.js b/extension/script.js index 83971fc..bcb8b9e 100644 --- a/extension/script.js +++ b/extension/script.js @@ -280,10 +280,9 @@ function buildChannelDownloadButton() { channelDownloadButton.title = `TA download video: ${videoId}`; checkVideoExists(channelDownloadButton); } else { - let toDownload = urlObj.pathname.slice(1); - channelDownloadButton.setAttribute('data-id', toDownload); + channelDownloadButton.setAttribute('data-id', currentLocation); channelDownloadButton.setAttribute('data-type', 'channel'); - channelDownloadButton.title = `TA download channel ${toDownload}`; + channelDownloadButton.title = `TA download channel ${currentLocation}`; } channelDownloadButton.innerHTML = downloadIcon; channelDownloadButton.addEventListener('click', e => {