Cleaned up context menu and made download button in popup work

This commit is contained in:
Leonetienne
2021-03-13 18:24:26 +01:00
parent 402ff761d4
commit c10a3f40f2
6 changed files with 113 additions and 37 deletions

View File

@@ -0,0 +1,21 @@
function QueueDownload(url, mode, quality, callback) {
console.log("Queuing '" + url + "'...");
axios.post("http://tub.io/api", {
request: "queue_download",
video_url: url,
mode: mode,
quality: quality
}).then(function(response){
console.log("Queued successfully...");
if (typeof(callback) != 'undefined') callback(true, response);
}).catch(function(response){
console.log("Something went wrong...");
console.log(response);
if (typeof(callback) != 'undefined') callback(false, response);
});
return;
}