Zotero.Prefs namespace, a thin synchronous cache layer backed by browser.storage.local (in BrowserExt builds) or the equivalent Safari storage API. All preference keys and their defaults are defined in src/common/zotero.js and overridden per-browser in src/browserExt/prefs.js or src/safari/prefs.js. The preferences UI (src/common/preferences/preferences.jsx) and the raw config editor (src/common/preferences/config.jsx) are built with React and opened as a full browser tab.
The Zotero.Prefs API
Reading preferences
Writing and clearing preferences
src/browserExt/prefs.js), set() and clear() are async and write through to browser.storage.local. The in-memory syncStorage object is updated immediately so subsequent synchronous get() calls reflect the new value.
browser.storage.local has a 10 MB limit per Chrome’s documentation. The connector approaches this limit when caching many translator source files. If a set() call fails due to quota exhaustion, the BrowserExt prefs.js automatically evicts five randomly chosen cached translator code entries and retries.Inspecting all preferences
Pre-loading namespaces in injected scripts
Because injected scripts cannot accessbrowser.storage directly, they must ask the background page to relay preferences. loadNamespace() fetches all preferences whose keys start with the given prefix and populates syncStorage so they can be read synchronously afterwards:
loadNamespace() throws if called from a background page. All preferences are always available synchronously in the background via the in-memory cache.Clearing cached translator code
removeAllCachedTranslators() and then forces a fresh fetch from the repository.
The Preferences UI
The preferences window is defined insrc/common/preferences/preferences.html and src/common/preferences/preferences.jsx. It is registered as the extension’s options page:
Panes
The preferences window has three panes:General
Zotero client connection status, zotero.org authorization, and (in BrowserExt) the Import BibTeX/RIS/Refer files MIME-type handler setting.
Advanced
Debug logging, translator cache reset, error reporting, keyboard shortcuts, Google Docs integration, and the Open Translator Tester button (debug builds only).
Proxies
Proxy redirection settings and the configured proxy list. BrowserExt only — this pane is hidden in Safari builds.
preferences.html#proxies opens the Proxies pane directly. Preference checkboxes that carry a data-pref attribute are wired up automatically:
The Config Editor
The config editor (src/common/preferences/config.html + config.jsx) shows every raw preference key and its current value in a filterable table. It is intended for power users and developers.
Access it from Preferences → Advanced → Config Editor. A confirmation dialog warns that changing settings can harm stability and security before the editor opens.
In the editor you can:
- Filter preferences by key name
- Double-click a row to edit its value (booleans toggle automatically; other types prompt for a new JSON-encoded value)
- Reset any preference to its default with the Reset link
- Add a new preference key/value pair with Add Preference
Zotero_Preferences_Config.Table (React) and calls Zotero.Prefs.getAll() on load to populate itself.
Preference Reference
All defaults are defined in theDEFAULTS object inside Zotero.Prefs (src/common/zotero.js).
General preferences
Translator cache preferences
Proxy preferences
All proxy settings live under theproxies. namespace and are available after Zotero.Prefs.loadNamespace('proxies').
Debug preferences
Integration preferences
Storage Backend
- Chrome / Edge / Firefox (BrowserExt)
- Safari
Preferences are stored in Subsequent
browser.storage.local. The BrowserExt prefs.js overrides Zotero.Prefs.init(), set(), and clear() to read and write through this API. init() loads the entire storage area into syncStorage at extension startup:get() calls are served from the in-memory syncStorage object without hitting storage again.