Spaces:
Sleeping
Sleeping
Download src/editor/eutils.js from hackathonM/Matou-Garou: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/hackathonM/Matou-Garou/resolve/main/src/editor/eutils.js
- Command line
-
hf download hf://spaces/hackathonM/Matou-Garou/src/editor/eutils.js
-
curl -L -o eutils.js https://huggingface.co/spaces/hackathonM/Matou-Garou/resolve/main/src/editor/eutils.js
616 Bytes
| // Function to download data to a file | |
| export function download(data, filename, type) { | |
| var file = new Blob([data], {type: type}); | |
| if (window.navigator.msSaveOrOpenBlob) // IE10+ | |
| window.navigator.msSaveOrOpenBlob(file, filename); | |
| else { // Others | |
| var a = document.createElement("a"), | |
| url = URL.createObjectURL(file); | |
| a.href = url; | |
| a.download = filename; | |
| document.body.appendChild(a); | |
| a.click(); | |
| setTimeout(function() { | |
| document.body.removeChild(a); | |
| window.URL.revokeObjectURL(url); | |
| }, 0); | |
| } | |
| } |