Browse Source

Merge pull request #784 from arturadib/fix-783

Replacing URL flag format for download
vingtetun 14 years ago
parent
commit
c15311c8eb
  1. 2
      extensions/firefox/components/pdfContentHandler.js
  2. 2
      web/viewer.js

2
extensions/firefox/components/pdfContentHandler.js

@ -52,7 +52,7 @@ pdfContentHandler.prototype = {
} }
let targetUrl = aRequest.URI.spec; let targetUrl = aRequest.URI.spec;
if (targetUrl.indexOf('?pdfjs.action=download') >= 0) if (targetUrl.indexOf('#pdfjs.action=download') >= 0)
throw NS_ERROR_WONT_HANDLE_CONTENT; throw NS_ERROR_WONT_HANDLE_CONTENT;
aRequest.cancel(Cr.NS_BINDING_ABORTED); aRequest.cancel(Cr.NS_BINDING_ABORTED);

2
web/viewer.js

@ -139,7 +139,7 @@ var PDFView = {
}, },
download: function pdfViewDownload() { download: function pdfViewDownload() {
window.open(this.url + '?pdfjs.action=download', '_parent'); window.open(this.url + '#pdfjs.action=download', '_parent');
}, },
navigateTo: function pdfViewNavigateTo(dest) { navigateTo: function pdfViewNavigateTo(dest) {

Loading…
Cancel
Save