1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

let instead of var and dead code

This commit is contained in:
Vincent LAURENT 2022-03-28 00:57:30 +02:00
parent afdcbf952c
commit 1996c661b2

View File

@ -23,16 +23,12 @@ var loadPDF = async function(pdfBlob, filename) {
let url = await URL.createObjectURL(pdfBlob);
var dataTransfer = new DataTransfer();
let dataTransfer = new DataTransfer();
dataTransfer.items.add(new File([pdfBlob], filename, {
type: 'application/pdf'
}));
document.getElementById('input_pdf').files = dataTransfer.files;
if(localStorage.getItem('pdfHistory')) {
pdfHistory = JSON.parse(localStorage.getItem('pdfHistory'));
}
var loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(function(pdf) {