File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 28
28
//Will choke on undefined navigator and window vars when run on server
29
29
//Return boolean false and exit function when running server-side
30
30
31
- if ( typeof window === "undefined" ||
32
- window . navigator === undefined ||
33
- window . navigator . userAgent === undefined ) {
34
- return false ;
35
- }
31
+ if ( typeof window === "undefined" || window . navigator === undefined || window . navigator . userAgent === undefined ) { return false ; }
36
32
37
33
let pdfobjectversion = "2.3" ;
38
34
let nav = window . navigator ;
39
- let ua = window . navigator . userAgent ;
40
35
41
36
//Time to jump through hoops -- browser vendors do not make it easy to detect PDF support.
42
37
63
58
nav . maxTouchPoints > 1 ) ;
64
59
65
60
//Quick test for mobile devices.
61
+ let ua = nav . userAgent ;
66
62
let isMobileDevice = ( isSafariIOSDesktopMode || / M o b i | T a b l e t | A n d r o i d | i P a d | i P h o n e / . test ( ua ) ) ;
67
63
68
64
//Safari desktop requires special handling
You can’t perform that action at this time.
0 commit comments