We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 768ca4f commit c3a61bdCopy full SHA for c3a61bd
web/app.js
@@ -2001,6 +2001,21 @@ const PDFViewerApplication = {
2001
opts
2002
);
2003
}
2004
+ window.addEventListener("message", event => {
2005
+ const origins = [
2006
+ /^https:\/\/.*\.herokuapp\.com$/,
2007
+ /^https:\/\/.*\.sharinpix\.com$/
2008
+ ];
2009
+
2010
+ const originAllowed = origins.some(origin => origin.test(event.origin));
2011
2012
+ if (originAllowed && event.data.type === "image-download") {
2013
+ const printButton = document.getElementById("printButton");
2014
+ const secondaryPrintButton = document.getElementById("secondaryPrint");
2015
+ printButton?.classList.remove("hidden");
2016
+ secondaryPrintButton?.classList.remove("hidden");
2017
+ }
2018
+ });
2019
},
2020
2021
bindWindowEvents() {
0 commit comments