From 30624c6aba575ccc1438c6fa07650c13ce1bf553 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 12 Jun 2023 13:25:20 -0400 Subject: [PATCH] Preferences: Remove `extraDTD` pane option Include FTL localizations directly in your pane XHTML fragment: Fixes #3161 --- chrome/content/zotero/preferences/preferences.js | 2 -- chrome/content/zotero/xpcom/preferencePanes.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 70573e08f1..609146210a 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -152,7 +152,6 @@ var Zotero_Preferences = { * @param {String} [options.rawLabel] A raw string to use as the label if options.label is not provided * @param {String} [options.image] URI of an icon (displayed in the navigation sidebar) * @param {String} options.src URI of an XHTML fragment - * @param {String[]} [options.extraDTD] Array of URIs of DTD files to use for parsing the XHTML fragment * @param {String[]} [options.scripts] Array of URIs of scripts to load along with the pane * @param {String[]} [options.stylesheets] Array of URIs of CSS stylesheets to load along with the pane * @param {Boolean} [options.defaultXUL] If true, parse the markup at `src` as XUL instead of XHTML: @@ -233,7 +232,6 @@ var Zotero_Preferences = { let dtdFiles = [ 'chrome://zotero/locale/zotero.dtd', 'chrome://zotero/locale/preferences.dtd', - ...(pane.extraDTD || []), ]; let contentFragment = pane.defaultXUL ? MozXULElement.parseXULToFragment(markup, dtdFiles) diff --git a/chrome/content/zotero/xpcom/preferencePanes.js b/chrome/content/zotero/xpcom/preferencePanes.js index a6127e8daa..16077306e9 100644 --- a/chrome/content/zotero/xpcom/preferencePanes.js +++ b/chrome/content/zotero/xpcom/preferencePanes.js @@ -103,7 +103,6 @@ Zotero.PreferencePanes = { * If not provided, the plugin's name is used * @param {String} [options.image] URI of an icon to be displayed in the navigation sidebar. * If not provided, the plugin's icon (from manifest.json) is used - * @param {String[]} [options.extraDTD] Array of URIs of DTD files to use for parsing the XHTML fragment * @param {String[]} [options.scripts] Array of URIs of scripts to load along with the pane * @param {String[]} [options.stylesheets] Array of URIs of CSS stylesheets to load along with the pane * @param {String[]} [options.helpURL] If provided, a help button will be displayed under the pane @@ -126,7 +125,6 @@ Zotero.PreferencePanes = { rawLabel: options.label || await Zotero.Plugins.getName(options.pluginID), image: options.image || await Zotero.Plugins.getIconURI(options.pluginID, 24), src: options.src, - extraDTD: options.extraDTD, scripts: options.scripts, stylesheets: options.stylesheets, helpURL: options.helpURL,