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

View File

@ -358,15 +358,17 @@ function buildVideoButton(titleContainer) {
dlButton.addEventListener('click', e => {
e.preventDefault();
sendButton(dlButton);
sendDownload(dlButton);
e.stopPropagation();
});
return dlButton;
}
function sendButton(button) {
console.log(button);
function sendDownload(button) {
let url = button.dataset.id;
if (!url) return;
sendUrl(url, 'download', button);
}
function buttonError(button) {