fx140: Use ZOTERO_CONFIG as module in standalone.js and debugViewer.js

This commit is contained in:
Abe Jellinek 2025-07-01 12:15:02 -04:00 • committed by Dan Stillman
parent c1f018eae8
commit 27bd0708b6
2 changed files with 4 additions and 5 deletions

View file

@ -79,10 +79,11 @@ function scrollToPageBottom() {
}
function submit(button) {
const { ZOTERO_CONFIG } = ChromeUtils.importESModule('resource://zotero/config.mjs');
button.setAttribute('disabled', '');
clearSubmitStatus();
Cu.import("resource://zotero/config.js");
var url = ZOTERO_CONFIG.REPOSITORY_URL + "report?debug=1";
var output = document.getElementById('errors').textContent
+ "\n\n" + "=========================================================\n\n"

View file

@ -28,6 +28,8 @@
* This object contains the various functions for the interface
*/
const ZoteroStandalone = new function () {
const { ZOTERO_CONFIG } = ChromeUtils.importESModule('resource://zotero/config.mjs');
const FONT_SIZES = [
"0.77", // 10
"0.85", // 11
@ -740,8 +742,6 @@ const ZoteroStandalone = new function () {
* Handles help menu requests
*/
this.openHelp = function (type) {
Cu.import("resource://zotero/config.js");
switch (type) {
case "troubleshooting":
ZoteroPane.loadURI(ZOTERO_CONFIG.TROUBLESHOOTING_URL);
@ -821,8 +821,6 @@ ZoteroStandalone.DebugOutput = {
return Zotero.Promise.coroutine(function* () {
Zotero.debug("Submitting debug output");
Cu.import("resource://zotero/config.js");
var url = ZOTERO_CONFIG.REPOSITORY_URL + "report?debug=1";
var output = yield Zotero.Debug.get(
Zotero.Prefs.get('debug.store.submitSize'),