mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-12-25 03:10:12 +00:00
fix video id extraction for url with additional query params
This commit is contained in:
parent
dfaf7612ce
commit
f5f919dfef
@ -274,7 +274,8 @@ function buildChannelDownloadButton() {
|
||||
let urlObj = new URL(currentLocation);
|
||||
|
||||
if (urlObj.pathname.startsWith('/watch')) {
|
||||
let videoId = urlObj.search.split('=')[1];
|
||||
let params = new URLSearchParams(document.location.search);
|
||||
let videoId = params.get('v');
|
||||
channelDownloadButton.setAttribute('data-type', 'video');
|
||||
channelDownloadButton.setAttribute('data-id', videoId);
|
||||
channelDownloadButton.title = `TA download video: ${videoId}`;
|
||||
|
Loading…
Reference in New Issue
Block a user