Merge remote-tracking branch 'upstream/master' into cmykjpgnorm

This commit is contained in:
Brendan Dahl 2011-11-09 09:50:57 -08:00
commit a0e1d0652c
4 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ using the pdf.js API.
### Extension
A up-to-date Firefox extension is also available:
An up-to-date Firefox extension is also available:
+ http://mozilla.github.com/pdf.js/extensions/firefox/pdf.js.xpi

View File

@ -52,7 +52,7 @@ pdfContentHandler.prototype = {
}
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;
aRequest.cancel(Cr.NS_BINDING_ABORTED);

View File

@ -321,7 +321,7 @@ def verifyPDFs(manifestList):
for item in manifestList:
f = item['file']
if os.access(f, os.R_OK):
fileMd5 = hashlib.md5(open(f).read()).hexdigest()
fileMd5 = hashlib.md5(open(f, 'rb').read()).hexdigest()
if 'md5' not in item:
print 'ERROR: Missing md5 for file "' + f + '".',
print 'Hash for current file is "' + fileMd5 + '"'

View File

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