Merge branch 'master' into feature/bombe

This commit is contained in:
s2224834 2019-03-12 18:07:39 +00:00
commit fa6d5e60ce
48 changed files with 4252 additions and 749 deletions

View file

@ -524,6 +524,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;