You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.3 KiB
62 lines
1.3 KiB
"use strict";
|
|
|
|
function subURL() {
|
|
$("body").css("cursor", "progress");
|
|
|
|
var lines = $('#urls').val().split('\n');
|
|
var url = [];
|
|
|
|
$.each(lines, function(){
|
|
if ('' === $.trim(this)) {
|
|
alert('Pas de liens ?');
|
|
return;
|
|
}
|
|
|
|
url.push($.trim(this));
|
|
});
|
|
|
|
if (url.length != 0) {
|
|
$.ajax({
|
|
url: "/download/",
|
|
type: 'post',
|
|
data: {
|
|
myurls: url,
|
|
dtype: dtype.value,
|
|
worker: worker.value
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
$("body").css("cursor", "auto");
|
|
location.reload();
|
|
},
|
|
error: function(xhr, err) {
|
|
$("body").css("cursor", "auto");
|
|
alert(err);
|
|
}
|
|
});
|
|
} else {
|
|
$("body").css("cursor", "auto");
|
|
}
|
|
}
|
|
|
|
function wipe(type, status)
|
|
{
|
|
$.ajax({
|
|
url: "/cleanList/",
|
|
type: 'get',
|
|
data: {
|
|
type: type,
|
|
state: status
|
|
},
|
|
dataType: 'json',
|
|
async: false,
|
|
success: function(data) {
|
|
$("body").css("cursor", "auto");
|
|
location.reload();
|
|
},
|
|
error: function(xhr, err) {
|
|
$("body").css("cursor", "auto");
|
|
alert('ERR');
|
|
}
|
|
});
|
|
}
|