From 125d4e0282fc4cd163a4f942c71b56bd5f548d22 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Tue, 3 May 2016 20:31:30 +0300 Subject: [PATCH] Improve PDF detection (#40) --- dev/Common/Globals.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index 719a45d54..6a7ba8795 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -199,6 +199,11 @@ Globals.bAllowPdfPreview = !!_.find(window.navigator.mimeTypes, function (oType) { return oType && 'application/pdf' === oType.type; }); + + if (!Globals.bAllowPdfPreview) + { + Globals.bAllowPdfPreview = (typeof window.navigator.mimeTypes['application/pdf'] !== 'undefined'); + } } Globals.aBootstrapDropdowns = [];