fx-compat: Fix Zotero.MIME.getMIMETypeFromURL()
Replace ``` Components.classes["@mozilla.org/network/standard-url;1"] .createInstance(Components.interfaces.nsIURL) ``` with ``` Services.io.newURI(url).QueryInterface(Ci.nsIURL); ```
This commit is contained in:
parent
30f636274b
commit
b3077182d2
1 changed files with 1 additions and 3 deletions
|
@ -344,9 +344,7 @@ Zotero.MIME = new function(){
|
||||||
var mimeType = xmlhttp.channel.contentType;
|
var mimeType = xmlhttp.channel.contentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
|
var nsIURL = Services.io.newURI(url).QueryInterface(Ci.nsIURL);
|
||||||
.createInstance(Components.interfaces.nsIURL);
|
|
||||||
nsIURL.spec = url;
|
|
||||||
|
|
||||||
// Override MIME type to application/pdf if extension is .pdf --
|
// Override MIME type to application/pdf if extension is .pdf --
|
||||||
// workaround for sites that respond to the HEAD request with an
|
// workaround for sites that respond to the HEAD request with an
|
||||||
|
|
Loading…
Reference in a new issue