From 7bcdc4fb297daab7f597f83e289b216be5ba1bb6 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 14 Apr 2017 14:56:02 +0200 Subject: Fix the download button in Firefox Replaces https://github.com/nextcloud/server/pull/4322 Fixes https://github.com/nextcloud/files_pdfviewer/issues/10 Signed-off-by: Lukas Reschke --- appinfo/info.xml | 2 +- js/workersrc.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 8949f0b..3e6f895 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -17,7 +17,7 @@ about the PDF.js project at [https://mozilla.github.io/pdf.js/](https://mozilla. AGPL Thomas Müller, Lukas Reschke - 1.1.0 + 1.1.1 diff --git a/js/workersrc.js b/js/workersrc.js index 7e4079f..2aa186b 100644 --- a/js/workersrc.js +++ b/js/workersrc.js @@ -15,3 +15,7 @@ redirectIfNotDisplayedInFrame(); PDFJS.openExternalLinksInNewWindow = true; PDFJS.isEvalSupported = false; PDFJS.workerSrc = document.getElementsByTagName('head')[0].getAttribute('data-workersrc'); + +PDFViewerApplication.download = function() { + window.open(decodeURIComponent(window.location.search.substr(6)), '_blank'); +}; \ No newline at end of file -- cgit v1.2.3 From 29ee2ad94084ec9af3b6adb4c2ee1987648ae697 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 18 Apr 2017 11:37:04 +0200 Subject: Fix Safari pdf displaying Signed-off-by: Joas Schilling --- js/previewplugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/previewplugin.js b/js/previewplugin.js index 2e71996..e5518b4 100644 --- a/js/previewplugin.js +++ b/js/previewplugin.js @@ -46,7 +46,7 @@ var self = this; var $iframe; var viewer = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: downloadUrl}); - $iframe = $('