mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 11:40:13 +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);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!taButton.parentElement) return;
|
let videoId = taButton.dataset.id;
|
||||||
let videoId = getVideoId(taButton.parentElement);
|
if (taButton.parentElement) {
|
||||||
taButton.setAttribute('data-id', videoId);
|
videoId = getVideoId(taButton.parentElement);
|
||||||
taButton.setAttribute('data-type', 'video');
|
taButton.setAttribute('data-id', videoId);
|
||||||
taButton.title = `TA download video: ${taButton.parentElement.innerText} [${videoId}]`;
|
taButton.setAttribute('data-type', 'video');
|
||||||
|
taButton.title = `TA download video: ${taButton.parentElement.innerText} [${videoId}]`;
|
||||||
|
}
|
||||||
|
|
||||||
let message = { type: 'videoExists', videoId };
|
let message = { type: 'videoExists', videoId };
|
||||||
let sending = sendMessage(message);
|
let sending = sendMessage(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user