From 7e0b89876570aecf0bdf46df549fe0dcfc89534a Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 17 Jan 2023 10:28:57 -0500 Subject: [PATCH] fx-compat: Preferences: Fix pane script global object Panes were being loaded with Zotero_Preferences as their global scope, so global variables they defined would be set on that object instead of the window. --- chrome/content/zotero/preferences/preferences.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 98ed279d24..a03dfffda5 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -234,7 +234,7 @@ var Zotero_Preferences = { if (!pane.imported) { if (pane.scripts) { for (let script of pane.scripts) { - Services.scriptloader.loadSubScript(script, this); + Services.scriptloader.loadSubScript(script, window); } } if (pane.stylesheets) {