Add attr()/text() to search translators

This commit is contained in:
Dan Stillman 2021-05-07 14:52:23 -04:00
parent d27b622f9f
commit d3a78982f0

View file

@ -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);