www

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

commit a0f1bbf8a674ed30d097c311df520ed34cabd67b
parent 0417a1910d139daeaf76f10c451877b3f5581ad4
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 28 Jan 2013 15:58:35 -0500

Fix code for determining whether to use defaultView as sandbox scope

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

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1584,7 +1584,9 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function Zotero.Translate.Web.prototype._getSandboxLocation = function() { if(this._parentTranslator) { return this._parentTranslator._sandboxLocation; - } else if(this.document.defaultView && this.document.defaultView.toString() === "[object Window]") { + } else if(this.document.defaultView + && (this.document.defaultView.toString().indexOf("Window") !== -1 + || this.document.defaultView.toString().indexOf("XrayWrapper") !== -1)) { return this.document.defaultView; } else { return this.document.location.toString();