Same pattern as the browse fix. archive, transmittal, classifier previously CDN-loaded jszip + docx-preview on first preview of a .zip / .docx file via shared/preview-lib.js's loadLibrary helper. That meant each first-preview blocked on a CDN round-trip + parse, and broke entirely under restrictive networks or CSPs. Vendor both libs under shared/vendor/ and concat them at the top of each tool's build, ahead of init.js. window.JSZip + window.docx are now defined immediately on page load. Drop the redundant loadLibrary calls (and classifier's stray <script src="cdn..."> tag in the template, plus archive's bespoke loadJSZip helper in export.js). xlsx (SheetJS) intentionally stays CDN-loaded — at ~900 KB it's too large to inline, and only fires on .xlsx preview which is a rarer path. Bundle size impact (uncompressed): archive: 304 KB → 476 KB (+172 KB) transmittal: 449 KB → 621 KB (+172 KB) classifier: 252 KB → 424 KB (+172 KB) With the gzip middleware (~75% reduction on HTML) and ETag-cached revalidation now in place, the wire-size delta is ~40 KB per tool on the first load and 0 on every subsequent load until redeploy. |
||
|---|---|---|
| .. | ||
| vendor | ||
| base.css | ||
| build-lib.sh | ||
| favicon.svg | ||
| hash.js | ||
| help.js | ||
| preview-lib.js | ||
| theme.js | ||
| zddc-filter-test.html | ||
| zddc-filter.js | ||
| zddc-test.html | ||
| zddc.js | ||