Fix saving PDFs open in pdf.js

This commit is contained in:
Simon Kornblith 2013-04-20 21:48:28 -04:00
parent 65c7a5988b
commit ce2828773b
2 changed files with 3 additions and 1 deletions

View file

@ -1487,6 +1487,7 @@ Zotero.Attachments = new function(){
*/ */
this.isPDFJS = function(doc) { this.isPDFJS = function(doc) {
// pdf.js HACK // pdf.js HACK
// This may no longer be necessary (as of Fx 23)
if(doc.contentType === "text/html") { if(doc.contentType === "text/html") {
var win = doc.defaultView; var win = doc.defaultView;
if(win) { if(win) {

View file

@ -3087,7 +3087,8 @@ var ZoteroPane = new function()
if (itemType == 'temporaryPDFHack') { if (itemType == 'temporaryPDFHack') {
itemType = null; itemType = null;
var isPDF = false; var isPDF = false;
if (doc.title.indexOf('application/pdf') != -1 || Zotero.Attachments.isPDFJS(doc)) { if (doc.title.indexOf('application/pdf') != -1 || Zotero.Attachments.isPDFJS(doc)
|| doc.contentType == 'application/pdf') {
isPDF = true; isPDF = true;
} }
else { else {