www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit d256caf94e03dfbd21f9dc37cea21e673b5e1bc6
parent 2facd4fcbdbc925dcbd6c85cc8b94bb5ae52ed52
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  5 Mar 2012 23:47:42 -0500

Make cross-site getTranslatorObject() work

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1425,13 +1425,10 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function * Bind sandbox to document being translated */ Zotero.Translate.Web.prototype._getSandboxLocation = function() { - if("defaultView" in this.document) { - var defaultView = this.document.defaultView; - if("__wrappedDOMObject" in defaultView) { - return defaultView.__wrappedDOMObject; - } else { - return defaultView; - } + if(this._parentTranslator) { + return this._parentTranslator._sandboxLocation; + } else if("defaultView" in this.document) { + return this.document.defaultView; } else { return this.document.location.toString(); }