From a384a91dad416103bcad26abeaf1fab3736a42d1 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Fri, 27 Feb 2015 16:50:41 +0000 Subject: [PATCH] PDF.js version 1.0.1167 --- bower.json | 2 +- build/pdf.combined.js | 16 ++++++++++++++-- build/pdf.js | 16 ++++++++++++++-- build/pdf.worker.js | 4 ++-- package.json | 2 +- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 71645b3d4..765c86d0e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.1165", + "version": "1.0.1167", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 7a3ab6aec..bee3d885c 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.1165'; -PDFJS.build = 'ce12259'; +PDFJS.version = '1.0.1167'; +PDFJS.build = '4c2640d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -1752,6 +1752,15 @@ PDFJS.verbosity = (PDFJS.verbosity === undefined ? PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ? 16777216 : PDFJS.maxCanvasPixels); +/** + * Opens external links in a new window if enabled. The default behavior opens + * external links in the PDF.js window. + * @var {boolean} + */ +PDFJS.openExternalLinksInNewWindow = ( + PDFJS.openExternalLinksInNewWindow === undefined ? + false : PDFJS.openExternalLinksInNewWindow); + /** * Document initialization / loading parameters object. * @@ -6744,6 +6753,9 @@ var AnnotationUtils = (function AnnotationUtilsClosure() { var link = document.createElement('a'); link.href = link.title = item.url || ''; + if (item.url && PDFJS.openExternalLinksInNewWindow) { + link.target = '_blank'; + } container.appendChild(link); diff --git a/build/pdf.js b/build/pdf.js index f192c124c..54a3f6f78 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.1165'; -PDFJS.build = 'ce12259'; +PDFJS.version = '1.0.1167'; +PDFJS.build = '4c2640d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -1752,6 +1752,15 @@ PDFJS.verbosity = (PDFJS.verbosity === undefined ? PDFJS.maxCanvasPixels = (PDFJS.maxCanvasPixels === undefined ? 16777216 : PDFJS.maxCanvasPixels); +/** + * Opens external links in a new window if enabled. The default behavior opens + * external links in the PDF.js window. + * @var {boolean} + */ +PDFJS.openExternalLinksInNewWindow = ( + PDFJS.openExternalLinksInNewWindow === undefined ? + false : PDFJS.openExternalLinksInNewWindow); + /** * Document initialization / loading parameters object. * @@ -6788,6 +6797,9 @@ var AnnotationUtils = (function AnnotationUtilsClosure() { var link = document.createElement('a'); link.href = link.title = item.url || ''; + if (item.url && PDFJS.openExternalLinksInNewWindow) { + link.target = '_blank'; + } container.appendChild(link); diff --git a/build/pdf.worker.js b/build/pdf.worker.js index dcf6f9821..04aa49ae2 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.1165'; -PDFJS.build = 'ce12259'; +PDFJS.version = '1.0.1167'; +PDFJS.build = '4c2640d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/package.json b/package.json index 6a4070f0b..fb9ddf1a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.1165", + "version": "1.0.1167", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",