diff --git a/mdedit/dist/mdedit.html b/mdedit/dist/mdedit.html index bf20787..c66669f 100644 --- a/mdedit/dist/mdedit.html +++ b/mdedit/dist/mdedit.html @@ -1774,7 +1774,7 @@ body.help-open .app-header {
ZDDC Markdown - v0.0.10 + v0.0.11
diff --git a/zddc/internal/apps/embedded/archive.html b/zddc/internal/apps/embedded/archive.html index 7d8bad3..3562716 100644 --- a/zddc/internal/apps/embedded/archive.html +++ b/zddc/internal/apps/embedded/archive.html @@ -2113,7 +2113,7 @@ td[data-field="trackingNumber"] {
ZDDC Archive - v0.0.10 + v0.0.11
@@ -5548,9 +5548,28 @@ window.app.modules.filtering = { */ async function showFilePreview(file) { const ext = file.extension.toLowerCase(); - + try { - const url = await getFileBlobUrl(file); + // For HTML preview, prefer the file's real server URL over a + // blob URL when available (zddc-server-backed archives have + // file.url set; local FileSystemAccessAPI mode doesn't). + // + // Why it matters: HTML files in an archive often link to + // sibling/parent paths via relative URLs — e.g. + // ../.archive/.html — which zddc-server intercepts + // and resolves. From a blob: URL the relative resolution + // produces blob:.../.archive/X.html, which never reaches the + // server. Loading the iframe from the actual https://zddc.../ + // URL means relative links resolve back to the server and the + // .archive interception fires as designed. + // + // Other types (pdf, images rendered via canvas / iframe etc.) + // are content-only — they don't depend on relative URLs — so + // a blob URL is fine. + const isHtml = ext === 'html' || ext === 'htm'; + const url = (isHtml && file.url) + ? file.url + : await getFileBlobUrl(file); // Mirror the parent window's theme in the popup const parentTheme = document.documentElement.getAttribute('data-theme') || ''; @@ -5714,7 +5733,7 @@ window.app.modules.filtering = { ${(ext === 'pdf' || ext === 'html' || ext === 'htm') - ? '' + ? '' : '
Loading preview...
'}