diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 98e6675e69..b18c1ca784 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -140,6 +140,17 @@ var Zotero_Preferences = { } }, + /** + * Get the scope object for a pane by its ID. + * A pane's scope contains the top-level variables defined by its scripts. + * + * @param {string} paneID + * @returns {Cu.Sandbox | null} + */ + getScope(paneID) { + return this.panes.get(paneID)?.scope ?? null; + }, + async _handleNavigationMouseOver(event) { if (event.target.tagName === 'richlistitem') { await this._loadPane(event.target.value);