Skip to content

Commit

Permalink
only load when in the files app
Browse files Browse the repository at this point in the history
Fixes #37
  • Loading branch information
icewind1991 committed Feb 16, 2017
1 parent 1d47754 commit ca4faaf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions appinfo/app.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
//load the required files
OCP\Util::addscript( 'files_markdown', 'editor');
OCP\Util::addStyle( 'files_markdown', 'preview' );
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'OCA\Files::loadAdditionalScripts',
function () {
//load the required files
OCP\Util::addscript('files_markdown', 'editor');
OCP\Util::addStyle('files_markdown', 'preview');
});

0 comments on commit ca4faaf

Please sign in to comment.