mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
ESMify EPUB and uses
This commit is contained in:
parent
937ad309a7
commit
6f96fa9da8
3 changed files with 3 additions and 5 deletions
|
|
@ -23,8 +23,6 @@
|
|||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
var EXPORTED_SYMBOLS = ["EPUB"];
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Zotero: "chrome://zotero/content/zotero.mjs",
|
||||
});
|
||||
|
|
@ -38,7 +36,7 @@ const ZipReader = Components.Constructor(
|
|||
const DC_NS = 'http://purl.org/dc/elements/1.1/';
|
||||
const OPF_NS = 'http://www.idpf.org/2007/opf';
|
||||
|
||||
class EPUB {
|
||||
export class EPUB {
|
||||
_zipReader;
|
||||
|
||||
_contentOPF = null;
|
||||
|
|
@ -411,7 +411,7 @@ Zotero.Fulltext = Zotero.FullText = new function () {
|
|||
* @return {Promise}
|
||||
*/
|
||||
this.indexEPUB = async function (filePath, itemID, allText) {
|
||||
const { EPUB } = ChromeUtils.import('chrome://zotero/content/EPUB.jsm');
|
||||
const { EPUB } = ChromeUtils.importESModule("chrome://zotero/content/EPUB.mjs");
|
||||
|
||||
let maxLength = Zotero.Prefs.get('fulltext.textMaxLength');
|
||||
if (maxLength === 0) {
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ Zotero.RecognizeDocument = new function () {
|
|||
}
|
||||
|
||||
async function _recognizeEPUB(item, filePath) {
|
||||
const { EPUB } = ChromeUtils.import('chrome://zotero/content/EPUB.jsm');
|
||||
const { EPUB } = ChromeUtils.importESModule("chrome://zotero/content/EPUB.mjs");
|
||||
|
||||
let epub = new EPUB(filePath);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue