diff --git a/build.xml b/build.xml index 8395da1..f15f329 100755 --- a/build.xml +++ b/build.xml @@ -186,8 +186,7 @@ - - + diff --git a/external/ViewerJS/compatibility.js b/external/ViewerJS/compatibility.js index 967e312..06f54bf 100644 --- a/external/ViewerJS/compatibility.js +++ b/external/ViewerJS/compatibility.js @@ -447,20 +447,10 @@ if (typeof PDFJS === 'undefined') { // Checks if navigator.language is supported (function checkNavigatorLanguage() { - if ('language' in navigator && - /^[a-z]+(-[A-Z]+)?$/.test(navigator.language)) { + if ('language' in navigator) { return; } - function formatLocale(locale) { - var split = locale.split(/[-_]/); - split[0] = split[0].toLowerCase(); - if (split.length > 1) { - split[1] = split[1].toUpperCase(); - } - return split.join('-'); - } - var language = navigator.language || navigator.userLanguage || 'en-US'; - PDFJS.locale = formatLocale(language); + PDFJS.locale = navigator.userLanguage || 'en-US'; })(); (function checkRangeRequests() { @@ -479,7 +469,10 @@ if (typeof PDFJS === 'undefined') { var regex = /Android\s[0-2][^\d]/; var isOldAndroid = regex.test(navigator.userAgent); - if (isSafari || isOldAndroid) { + // Range requests are broken in Chrome 39 and 40, https://crbug.com/442318 + var isChromeWithRangeBug = /Chrome\/(39|40)\./.test(navigator.userAgent); + + if (isSafari || isOldAndroid || isChromeWithRangeBug) { PDFJS.disableRange = true; PDFJS.disableStream = true; } @@ -572,3 +565,13 @@ if (typeof PDFJS === 'undefined') { PDFJS.maxCanvasPixels = 5242880; } })(); + +// Disable fullscreen support for certain problematic configurations. +// Support: IE11+ (when embedded). +(function checkFullscreenSupport() { + var isEmbeddedIE = (navigator.userAgent.indexOf('Trident') >= 0 && + window.parent !== window); + if (isEmbeddedIE) { + PDFJS.disableFullscreen = true; + } +})(); diff --git a/external/ViewerJS/images/toolbarButton-print.png b/external/ViewerJS/images/toolbarButton-print.png new file mode 100644 index 0000000..51275e5 Binary files /dev/null and b/external/ViewerJS/images/toolbarButton-print.png differ diff --git a/external/ViewerJS/index.html b/external/ViewerJS/index.html index d7ac9de..dc53a69 100644 --- a/external/ViewerJS/index.html +++ b/external/ViewerJS/index.html @@ -36,41 +36,48 @@ along with ViewerJS. If not, see . --> - @@ -78,15 +85,16 @@ c;a?(d.title||(d.title=a.replace(/^.*[\\\/]/,"")),d.documentUrl=a,b(a,function(b
-
+
+
-
-
+
+