Added 'Move to input' button to output file list. Improved zlib extraction efficiency.

This commit is contained in:
n1474335 2019-03-09 06:25:27 +00:00
parent 9fa7edffbf
commit 84d31c1d59
9 changed files with 94 additions and 28 deletions

View file

@ -494,6 +494,24 @@ class OutputWaiter {
magicButton.setAttribute("data-original-title", "Magic!");
}
/**
* Handler for extract file events.
*
* @param {Event} e
*/
async extractFileClick(e) {
e.preventDefault();
e.stopPropagation();
const el = e.target.nodeName === "I" ? e.target.parentNode : e.target;
const blobURL = el.getAttribute("blob-url");
const fileName = el.getAttribute("file-name");
const blob = await fetch(blobURL).then(r => r.blob());
this.manager.input.loadFile(new File([blob], fileName, {type: blob.type}));
}
}
export default OutputWaiter;