Skip to content

Commit ba4a15a

Browse files
committed
Add FF check
1 parent d37c492 commit ba4a15a

5 files changed

Lines changed: 8 additions & 39 deletions

File tree

bower.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pdfobject",
3-
"version": "2.0.201604172",
3+
"version": "2.1",
44
"description": "An open-source standards-friendly JavaScript utility for embedding PDF files into HTML documents",
55
"main": "pdfobject.js",
66
"scripts": {

pdfobject.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//jshint unused:false, strict: false
33

44
/*
5-
PDFObject v2.0.201604172
5+
PDFObject v2.1
66
https://github.com/pipwerks/PDFObject
77
Copyright (c) 2008-2016 Philip Hutchison
88
MIT-style license: http://pipwerks.mit-license.org/
@@ -48,6 +48,8 @@
4848
getTargetElement,
4949
generatePDFJSiframe,
5050
isIOS = (function (){ return (/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase())); })(),
51+
// https://stackoverflow.com/a/9851769/1026742
52+
isFirefox = typeof InstallTrigger !== 'undefined',
5153
generateEmbedElement;
5254

5355

@@ -78,7 +80,7 @@
7880
supportsPdfActiveX = function (){ return !!(createAXO("AcroPDF.PDF") || createAXO("PDF.PdfCtrl")); };
7981

8082
//Determines whether PDF support is available
81-
supportsPDFs = (supportsPdfMimeType || (isIE() && supportsPdfActiveX()));
83+
supportsPDFs = (supportsPdfMimeType || isFirefox || (isIE() && supportsPdfActiveX()));
8284

8385
//Create a fragment identifier for using PDF Open parameters when embedding PDF
8486
buildFragmentString = function(pdfParams){
@@ -251,4 +253,4 @@
251253
supportsPDFs: (function (){ return supportsPDFs; })()
252254
};
253255

254-
}));
256+
}));

pdfobject.min.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### This is a fork of the main library to add-in an opinionated Firefox check for inline PDF support
2+
13
PDFObject is a lightweight JavaScript utility for dynamically embedding PDFs in HTML documents.
24

35
Copyright (c) 2008-2016 Philip Hutchison

0 commit comments

Comments
 (0)