This commit is contained in:
Ritiek Malhotra 2024-04-07 07:49:23 +00:00 committed by GitHub
commit 55a5daea68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -437,11 +437,13 @@ function checkVideoExists(taButton) {
console.error(e);
}
if (!taButton.parentElement) return;
let videoId = getVideoId(taButton.parentElement);
taButton.setAttribute('data-id', videoId);
taButton.setAttribute('data-type', 'video');
taButton.title = `TA download video: ${taButton.parentElement.innerText} [${videoId}]`;
let videoId = taButton.dataset.id;
if (taButton.parentElement) {
videoId = getVideoId(taButton.parentElement);
taButton.setAttribute('data-id', videoId);
taButton.setAttribute('data-type', 'video');
taButton.title = `TA download video: ${taButton.parentElement.innerText} [${videoId}]`;
}
let message = { type: 'videoExists', videoId };
let sending = sendMessage(message);