Spaces:
p
Running

p / index.html
ArtemKalay's picture
Add report loader
8affff9 verified
Raw History Blame Contribute Delete
797 Bytes
<!DOCTYPE html><html lang="ru"><head><meta charset="utf-8"><meta name="robots" content="noindex"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Покупали у поставщиков</title></head><body><p id="l" style="font:16px sans-serif;padding:16px">Загрузка…</p><script>
(async()=>{const p=await Promise.all([1,2,3,4].map(i=>fetch('p'+i+'.bin',{cache:'no-store'}).then(r=>{if(!r.ok)throw r.status;return r.arrayBuffer()})));
const t=await new Response(new Blob(p).stream().pipeThrough(new DecompressionStream('gzip'))).text();
document.open();document.write(t);document.close();})().catch(()=>{document.getElementById('l').textContent='Не удалось загрузить отчёт. Обновите страницу.'});
</script></body></html>