download video

This commit is contained in:
Simon 2023-08-24 21:40:23 +07:00
parent 004067a1f7
commit c3079d81ff
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 5 additions and 3 deletions

View File

@ -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) {