Make cross-site getTranslatorObject() work
This commit is contained in:
parent
2facd4fcbd
commit
d256caf94e
1 changed files with 4 additions and 7 deletions
|
@ -1425,13 +1425,10 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function
|
||||||
* Bind sandbox to document being translated
|
* Bind sandbox to document being translated
|
||||||
*/
|
*/
|
||||||
Zotero.Translate.Web.prototype._getSandboxLocation = function() {
|
Zotero.Translate.Web.prototype._getSandboxLocation = function() {
|
||||||
if("defaultView" in this.document) {
|
if(this._parentTranslator) {
|
||||||
var defaultView = this.document.defaultView;
|
return this._parentTranslator._sandboxLocation;
|
||||||
if("__wrappedDOMObject" in defaultView) {
|
} else if("defaultView" in this.document) {
|
||||||
return defaultView.__wrappedDOMObject;
|
return this.document.defaultView;
|
||||||
} else {
|
|
||||||
return defaultView;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return this.document.location.toString();
|
return this.document.location.toString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue