mirror of
https://github.com/zotero/zotero.git
synced 2026-10-11 03:38:25 +00:00
As of Firefox 153.3.0esr, Services.scriptloader refuses jar:file: and file: URIs unless allowUnsafeURL is passed (Mozilla bug 1974213), so no plugin loads: bootstrap.js fails with "Trying to load untrusted URI", then "Plugin ... is missing bootstrap method 'startup'". Pass allowUnsafeURL when loading a plugin's bootstrap.js and prefs.js, and preference pane scripts, and temporarily enable security.allow_unsafe_subscript_loads, which covers loads from plugin code outside the bootstrap scope. Also add a test that installs a fixture plugin that loads a script from its XPI and sets a default pref. --------- Co-authored-by: Dan Stillman <dstillman@zotero.org>
14 lines
337 B
JavaScript
14 lines
337 B
JavaScript
/* global Zotero, Services */
|
|
function startup({ rootURI }) {
|
|
// Load a script from this XPI into the plugin scope
|
|
Services.scriptloader.loadSubScript(rootURI + 'main.js');
|
|
Zotero.PluginLoadingTest = pluginLoadingTestMain();
|
|
}
|
|
|
|
function shutdown() {
|
|
delete Zotero.PluginLoadingTest;
|
|
}
|
|
|
|
function install() {}
|
|
|
|
function uninstall() {}
|