}
if (time == 'month')
{
- d.setSeconds (d.getSeconds() + 2419200);
+ d.setSeconds (d.getSeconds() + 2592000);
return true;
}
if (time == 'quarter')
{
- d.setSeconds (d.getSeconds() + 7257600);
+ d.setSeconds (d.getSeconds() + 7776000);
return true;
}
if (time == 'year')
{
- d.setSeconds (d.getSeconds() + 29030400);
+ d.setSeconds (d.getSeconds() + 31536000);
return true;
}
return false;
function upload (max_size)
{
+ var one_time_checkbox = document.getElementById('one_time_download');
+ var one_time = one_time_checkbox !== null ? one_time_checkbox.checked : false;
if (check_html5_file_api ()
&& document.getElementById('file_select').files[0].size >= max_size)
{
document.getElementById('file_select').files[0],
document.getElementById('select_time').value,
document.getElementById('input_key').value,
- document.getElementById('one_time_download').checked,
+ one_time,
document.getElementById('upload_password').value
);
}
document.getElementById('file_select').files[0],
document.getElementById('select_time').value,
document.getElementById('input_key').value,
- document.getElementById('one_time_download').checked,
+ one_time,
document.getElementById('upload_password').value
);
}
}
function addCopyListener(button_id, link_id) {
- document.getElementById(button_id)
+ if(document.getElementById(button_id)){
+ document.getElementById(button_id)
.addEventListener("click", function() {
copyLinkToClipboard(link_id);});
+ }
}
// @license-end