Fix ISBN lookup on branch
This commit is contained in:
parent
b4aa23fc0e
commit
78a79abfab
1 changed files with 16 additions and 3 deletions
|
@ -226,14 +226,27 @@ Zotero.Utilities.Translate.prototype.processDocuments = function(urls, processor
|
|||
}
|
||||
}
|
||||
|
||||
var translate = this._translate;
|
||||
var loc = translate.document.location;
|
||||
if(Zotero.isFx) {
|
||||
var translate = this._translate;
|
||||
if(translate.document) {
|
||||
var protocol = translate.document.location.protocol,
|
||||
host = translate.document.location.host;
|
||||
} else {
|
||||
var url = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(typeof translate._sandboxLocation === "object" ?
|
||||
translate._sandboxLocation.location : translate._sandboxLocation, null, null),
|
||||
protocol = url.scheme+":",
|
||||
host = url.host;
|
||||
}
|
||||
}
|
||||
|
||||
translate.incrementAsyncProcesses("Zotero.Utilities.Translate#processDocuments");
|
||||
var hiddenBrowser = Zotero.HTTP.processDocuments(urls, function(doc) {
|
||||
if(!processor) return;
|
||||
|
||||
var newLoc = doc.location;
|
||||
if(Zotero.isFx && (loc.protocol !== newLoc.protocol || loc.host !== newLoc.host)) {
|
||||
if(Zotero.isFx && (protocol != newLoc.protocol || host != newLoc.host)) {
|
||||
// Cross-site; need to wrap
|
||||
processor(Zotero.Translate.SandboxManager.Fx5DOMWrapper(doc), newLoc.toString());
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue