diff --git a/chrome/content/zotero/import/importWizard.js b/chrome/content/zotero/import/importWizard.js index 3f42467a3d..0b4ab7af4b 100644 --- a/chrome/content/zotero/import/importWizard.js +++ b/chrome/content/zotero/import/importWizard.js @@ -38,6 +38,7 @@ const { directAuth } = mendeleyAPIUtils; const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars file: null, folder: null, + isZotfileInstalled: false, libraryID: null, mendeleyAuth: null, mendeleyCode: null, @@ -69,6 +70,9 @@ const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars this.mendeleyHasPreviouslyImported = !!(await Zotero.DB.valueQueryAsync(relSQL, predicateID)); } + const extensions = await Zotero.getInstalledExtensions(); + this.isZotfileInstalled = !!extensions.find(extName => extName.match(/^ZotFile((?!disabled).)*$/)); + this.wizard = document.getElementById('import-wizard'); this.wizard.getPageById('page-start') .addEventListener('pageadvanced', this.onImportSourceAdvance.bind(this)); @@ -272,6 +276,13 @@ const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars case 'mendeleyOnline': this.file = null; this.folder = null; + if (this.isZotfileInstalled) { + this.skipToDonePage( + 'general-error', + ['import-online-blocked-by-plugin', { plugin: 'ZotFile' }] + ); + return; + } this.wizard.goTo('page-mendeley-online-intro'); this.wizard.canRewind = true; break; diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index 32da2f0b54..2316d11b62 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -60,6 +60,7 @@ import-online-intro=In the next step you will be asked to log in to { $targetApp import-online-intro2={ -app-name } will never see or store your { $targetApp } password. import-online-form-intro = Please enter your credentials to log in to { $targetAppOnline }. This is necessary to import your { $targetApp } library into { -app-name }. import-online-wrong-credentials = Login to { $targetApp } failed. Please re-enter credentials and try again. +import-online-blocked-by-plugin = The import cannot continue with { $plugin } installed. Please disable this plugin and try again. report-error = .label = Report Error…