From e7fa5d7f9d4750011cefd7a0cdbac8439dcca636 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 10 Dec 2022 02:10:48 -0700 Subject: [PATCH] Add `setTimeout` and `clearTimeout` to plugin scope --- chrome/content/zotero/xpcom/plugins.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/xpcom/plugins.js b/chrome/content/zotero/xpcom/plugins.js index 5fa86f2f8f..55ce2eae18 100644 --- a/chrome/content/zotero/xpcom/plugins.js +++ b/chrome/content/zotero/xpcom/plugins.js @@ -89,6 +89,10 @@ Zotero.Plugins = new function () { scope[name] = REASONS[name]; } Object.assign(scope, { Services, Worker, ChromeWorker, Zotero }); + // Add additional global functions + scope.setTimeout = Zotero.setTimeout; + scope.clearTimeout = Zotero.clearTimeout; + scopes.set(addon.id, scope); var uri = addon.getResourceURI().spec + 'bootstrap.js';