]> git.parisson.com Git - pdf.js.git/commitdiff
Add code to nulti page viewer to works with the extension
authorVivien Nicolas <21@vingtetun.org>
Tue, 26 Jul 2011 15:21:37 +0000 (17:21 +0200)
committerVivien Nicolas <21@vingtetun.org>
Tue, 26 Jul 2011 15:21:37 +0000 (17:21 +0200)
web/multi_page_viewer.js

index 3e7e122e07bf30cf831f5bc307e068facf906665..e5b97da60f8376aea5940d765413f7c2144bce64 100644 (file)
@@ -249,6 +249,8 @@ var PDFViewer = {
   openURL: function(url) {
     PDFViewer.url = url;
     document.title = url;
+    if (url.indexOf("http") == 0)
+      return;
 
     if (this.thumbsLoadingInterval) {
       // cancel thumbs loading operations
@@ -511,3 +513,7 @@ window.onload = function() {
     }
   };
 };
+
+window.addEventListener('pdfloaded', function(evt) {
+  PDFViewer.readPDF(data);
+}, true);