From 3837ca0b68a81995ee7b7b90e596054b505d1cb0 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 <75730405+AuroraHuang22@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:08:45 +0800 Subject: [PATCH] Add Sentry --- web/app.js | 10 ++++++---- web/viewer-snippet.html | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/web/app.js b/web/app.js index daaf0a54f28e8c..8ef838a5c46cdc 100644 --- a/web/app.js +++ b/web/app.js @@ -3153,19 +3153,21 @@ function webViewerPostMessage(evt) { } else { ({ action, data } = evt.data); } + const filename = data.name ? `${data.name}.pdf` : "liker-land_ebook.pdf"; + const url = `https://liker.land/${filename}`; switch (action) { case "openBase64File": PDFViewerApplication.open({ data: atob(data.data), - originalUrl: data.name, - filename: data.name ? `${data.name}.pdf` : "liker-land_ebook.pdf", + url, + filename, }); break; case "openArrayBufferFile": PDFViewerApplication.open({ data: new Uint8Array(data.data), - originalUrl: data.name, - filename: data.name ? `${data.name}.pdf` : "liker-land_ebook.pdf", + url, + filename, }); break; } diff --git a/web/viewer-snippet.html b/web/viewer-snippet.html index 3baf94773bfd49..0491041485eed7 100644 --- a/web/viewer-snippet.html +++ b/web/viewer-snippet.html @@ -1,3 +1,7 @@ +