From d3a78982f01c3aad704e67e6c6b09cf54d33d8fb Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 7 May 2021 14:52:23 -0400 Subject: [PATCH] Add attr()/text() to search translators --- chrome/content/zotero/xpcom/translation/translate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 999126795d..a30f61394d 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1861,8 +1861,8 @@ Zotero.Translate.Base.prototype = { this._sandboxManager.sandbox.ZU = this._sandboxZotero.Utilities; this._transferItem = this._sandboxZotero._transferItem; - // Add web helper functions - if (this.type == 'web') { + // Add helper functions + if (this.type == 'web' || this.type == 'search') { this._sandboxManager.sandbox.attr = this._attr.bind(this); this._sandboxManager.sandbox.text = this._text.bind(this); this._sandboxManager.sandbox.innerText = this._innerText.bind(this);