Fix the download button.

This commit is contained in:
Brendan Dahl 2012-01-24 21:33:03 -08:00
parent dd8c39d8e1
commit 858aab008f
2 changed files with 19 additions and 4 deletions

View file

@ -249,7 +249,14 @@ var PDFView = {
},
download: function pdfViewDownload() {
window.open(this.url + '#pdfjs.action=download', '_parent');
var url = this.url.split('#')[0];
// For the extension we add an extra '?' to force the page to reload, its
// stripped off by the extension.
if (PDFJS.isFirefoxExtension)
url += '?#pdfjs.action=download';
else
url += '#pdfjs.action=download', '_parent';
window.open(url, '_parent');
},
navigateTo: function pdfViewNavigateTo(dest) {