Skip to content

Commit 34618e7

Browse files
authored
Merge pull request #30 from SharinPix/rename-print-event
Rename print event
2 parents 1f76a9f + bd25113 commit 34618e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@ const PDFViewerApplication = {
20032003
}
20042004
window.addEventListener("message", event => {
20052005
const origins = [
2006-
/^http:\/\/localhost:5000.*/,
2006+
/^http:\/\/localhost:(5000|4200).*$/,
20072007
/^https:\/\/.*\.herokuapp\.com$/,
20082008
/^https:\/\/.*\.sharinpix\.com$/,
20092009
];
20102010
const originAllowed = origins.some(origin => origin.test(event.origin));
2011-
if (originAllowed && event.data.type === "image-download") {
2011+
if (originAllowed && event.data.type === "enable-pdf-download") {
20122012
const printButton = document.getElementById("printButton");
20132013
const secondaryPrintButton = document.getElementById("secondaryPrint");
20142014
printButton?.classList.remove("hidden");

0 commit comments

Comments
 (0)