Unzipping images from a zip script src https cdnjs cloudflare com ajax libs jszip 3 6 0 jszip min js script script console log JSZip ref https stuk github io jszip documentation api_jszip load_async_object html async console log processing zip let response await fetch https notebook xbdev net var images svgs zip let arrayBuffer await response arrayBuffer let zip await JSZip loadAsync arrayBuffer Object keys zip files forEach function filename console log filename filename console log ready script Unzipping images from a zip style body min height 1200px style script src https cdnjs cloudflare com ajax libs jszip 3 6 0 jszip min js script script console log JSZip ref https stuk github io jszip documentation api_jszip load_async_object html async console log processing zip let response await fetch https notebook xbdev net var images svgs zip let arrayBuffer await response arrayBuffer let zip await JSZip loadAsync arrayBuffer let filenames Object keys zip files for let n 0 n filenames length n let filename filenames n console log filename filenames n let fileData await zip files filename async uint8array let ss new TextDecoder decode fileData let myblob new Blob ss type image svg xml type text plain let outurl URL createObjectURL myblob let fileData await zip files filename async string let myblob new Blob fileData type image svg xml let outurl URL createObjectURL myblob let img document createElement img document body appendChild img img width 40 img src outurl console log ready script Unzipping images from a zip style body min height 1200px style script src https cdnjs cloudflare com ajax libs jszip 3 6 0 jszip min js script script console log JSZip ref https stuk github io jszip documentation api_jszip load_async_object html async console log processing zip let response await fetch https notebook xbdev net var images svgs zip let arrayBuffer await response arrayBuffer let zip await JSZip loadAsync arrayBuffer let filenames Object keys zip files let jsondata await zip files info json async string jsondata JSON parse jsondata console log jsondata jsondata forEach async function n let sfrom parseInt n from let sto parseInt n to let sname n name console log name sname sfrom sfrom sto sto let div document createElement div document body appendChild div let h1 document createElement h1 h1 innerHTML sname div appendChild h1 for let g sfrom g sto g let filename g svg console log filename filename if filenames includes filename continue let fileData await zip files filename async string let myblob new Blob fileData type image svg xml let outurl URL createObjectURL myblob let img document createElement img div appendChild img img width 30 img src outurl console log ready script
ement img document body appendChild img img width 40 img src outurl console log ready script Unzipping images from a zip style body min height 1200px style script src https cdnjs cloudflare com ajax libs jszip 3 6 0 jszip min js script script console log JSZip ref https stuk github io jszip documentation api_jszip load_async_object html async console log processing zip let response await fetch https notebook xbdev net var images svgs zip let arrayBuffer await response arrayBuffer let zip await JSZip loadAsync arrayBuffer let filenames Object keys zip files let jsondata await zip files info json async string jsondata JSON parse jsondata console log jsondata jsondata forEach async function n let sfrom parseInt n from let sto parseInt n to let sname n name console log name sname sfrom sfrom sto sto let div document createElement div document body appendChild div let h1 document createElement h1 h1 innerHTML sname div appendChild h1 for let g sfrom g sto g let filename g svg console log filename filename if filenames includes filename continue let fileData await zip files filename async string let myblob new Blob fileData type image svg xml let outurl URL createObjectURL myblob let img document createElement img div appendChild img img width 30 img src outurl console log ready script