diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-04 20:56:55 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-11-04 20:56:55 +0300 |
commit | 062fb3f5ae356ed30b0a596a26b5a45db7089116 (patch) | |
tree | eef1be73d749ea946932769f0537173aaf300b48 /src | |
parent | 691a67cb760f6a5f2d2bffc750c05b1ec6357edf (diff) |
Revert "Move viewer registration out of DOMContentLoaded"
This reverts commit db061cfc01e305e36224d06060d343cf47684e04.
Diffstat (limited to 'src')
-rw-r--r-- | src/files.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/files.js b/src/files.js index c2b975f63..0ab1a7d32 100644 --- a/src/files.js +++ b/src/files.js @@ -30,22 +30,20 @@ __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line registerFileCreate() -if (typeof OCA.Viewer !== 'undefined') { - OCA.Viewer.registerHandler({ - id: 'text', - mimes: [...openMimetypesMarkdown, ...openMimetypesPlainText], - component: FilesEditor, - group: null - }) -} - document.addEventListener('DOMContentLoaded', () => { if (typeof OCA.Viewer === 'undefined') { console.error('Viewer app is not installed') registerFileActionFallback() return } + OCA.Viewer.registerHandler({ + id: 'text', + mimes: [...openMimetypesMarkdown, ...openMimetypesPlainText], + component: FilesEditor, + group: null + }) OC.Plugins.register('OCA.Files.SidebarPreviewManager', new PreviewPlugin()) + }) OCA.Text = { |