diff --git a/web/app.js b/web/app.js
index daaf0a54f28e8..8ef838a5c46cd 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 3baf94773bfd4..0491041485eed 100644
--- a/web/viewer-snippet.html
+++ b/web/viewer-snippet.html
@@ -1,3 +1,7 @@
+
diff --git a/web/viewer.js b/web/viewer.js
index 6f2b1aec31a77..c49368e13ec7d 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -263,6 +263,14 @@ function webViewerLoad() {
PDFViewerApplication.run(config);
}
+if (window.Sentry) {
+ window.Sentry.onLoad(function () {
+ window.Sentry.init({
+ tracesSampleRate: 0.1,
+ });
+ });
+}
+
// Block the "load" event until all pages are loaded, to ensure that printing
// works in Firefox; see https://bugzilla.mozilla.org/show_bug.cgi?id=1618553
document.blockUnblockOnload?.(true);