speedtrans/js/dnd.js

15 lines
456 B
JavaScript
Raw Normal View History

$(function() {
document.addEventListener('dragenter', function(event) {
event.preventDefault();
});
document.addEventListener('dragover', function(event) {
event.preventDefault();
});
document.addEventListener('drop', function(event) {
if (event.dataTransfer.files && event.dataTransfer.files.length) {
event.preventDefault();
2015-12-20 23:54:18 +00:00
loadVideo(event.dataTransfer.files[0])
}
});
});