diff --git a/web/js/imageFeed.js b/web/js/imageFeed.js index b477912..e214d22 100644 --- a/web/js/imageFeed.js +++ b/web/js/imageFeed.js @@ -410,7 +410,7 @@ app.registerExtension({ api.addEventListener("executed", ({ detail }) => { if (visible && detail?.output?.images) { for (const src of detail.output.images) { - const href = `/view?filename=${encodeURIComponent(src.filename)}&type=${ + const href = `./view?filename=${encodeURIComponent(src.filename)}&type=${ src.type }&subfolder=${encodeURIComponent(src.subfolder)}&t=${+new Date()}`; diff --git a/web/js/showImageOnMenu.js b/web/js/showImageOnMenu.js index c38b5e7..4f4bcbe 100644 --- a/web/js/showImageOnMenu.js +++ b/web/js/showImageOnMenu.js @@ -51,7 +51,7 @@ const ext = { const images = detail?.output?.images; if (!images) return; const format = app.getPreviewFormatParam(); - const src = `/view?filename=${encodeURIComponent(images[0].filename)}&type=${ + const src = `./view?filename=${encodeURIComponent(images[0].filename)}&type=${ images[0].type }&subfolder=${encodeURIComponent(images[0].subfolder)}&t=${+new Date()}${format}`; show(src, detail.node);