mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 11:40:13 +00:00
download video
This commit is contained in:
parent
004067a1f7
commit
c3079d81ff
@ -358,15 +358,17 @@ function buildVideoButton(titleContainer) {
|
|||||||
|
|
||||||
dlButton.addEventListener('click', e => {
|
dlButton.addEventListener('click', e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sendButton(dlButton);
|
sendDownload(dlButton);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|
||||||
return dlButton;
|
return dlButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendButton(button) {
|
function sendDownload(button) {
|
||||||
console.log(button);
|
let url = button.dataset.id;
|
||||||
|
if (!url) return;
|
||||||
|
sendUrl(url, 'download', button);
|
||||||
}
|
}
|
||||||
|
|
||||||
function buttonError(button) {
|
function buttonError(button) {
|
||||||
|
Loading…
Reference in New Issue
Block a user