zotero-plugin 2.0.30 → 2.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/debug-log.js +4 -3
- package/package.json +1 -1
package/debug-log.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.DebugLog = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
7
|
-
if (Zotero.platformMajorVersion >= 102)
|
|
8
|
-
Components.utils.importGlobalProperties(['FormData']);
|
|
9
6
|
const UZip = tslib_1.__importStar(require("uzip"));
|
|
10
7
|
class DebugLogSender {
|
|
11
8
|
constructor() {
|
|
@@ -101,6 +98,10 @@ class DebugLogSender {
|
|
|
101
98
|
const rdf = await this.rdf();
|
|
102
99
|
if (rdf)
|
|
103
100
|
files[`${key}/items.rdf`] = enc.encode(rdf);
|
|
101
|
+
// do this runtime because Zotero is not defined at start for bootstrapped zoter6 plugins
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
103
|
+
if (typeof FormData === 'undefined' && Zotero.platformMajorVersion >= 102)
|
|
104
|
+
Components.utils.importGlobalProperties(['FormData']);
|
|
104
105
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
105
106
|
const zip = new Uint8Array(UZip.encode(files));
|
|
106
107
|
const blob = new Blob([zip], { type: 'application/zip' });
|