mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-12-25 03:10:12 +00:00
Show checkmark for already downloaded currently playing videos (#35)
Looks like this was regressed from v0.2.1 to v0.2.2 in this commit sha:
f8d69f5883
Already downloaded video currently playing in YouTube were still
showing the download icon instead of checkmark icon in TA.
This commit should fix this.
This commit is contained in:
parent
82a64ff4ba
commit
761030ca55
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user