From ae740768b0cab89a3e2033cb9a8a7f3ccde16082 Mon Sep 17 00:00:00 2001 From: David Flanagan Date: Tue, 5 May 2015 01:04:45 +0200 Subject: [PATCH] Bug 1152841 - make pdf.js viewer app handle open requests from file viewers --- web/viewer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/viewer.js b/web/viewer.js index 2dc8bf174..6a6389f43 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -2242,7 +2242,9 @@ window.addEventListener('afterprint', function afterPrint(evt) { //window.navigator.mozSetMessageHandler('activity', function(activity) { // var blob = activity.source.data.blob; // PDFJS.maxImageSize = 1024 * 1024; -// var fileURL = activity.source.data.url; +// var fileURL = activity.source.data.url || +// activity.source.data.filename || +// " "; // if no url or filename, use a non-empty string // // var url = URL.createObjectURL(blob); // // We need to delay opening until all HTML is loaded.