-
Notifications
You must be signed in to change notification settings - Fork 3
/
extend.php
33 lines (27 loc) · 1.09 KB
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/*
* This file is part of zerosonesfun/flarum-inline-audio.
*
* Copyright (c) 2021 Billy Wilcosky.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace Zerosonesfun\InlineAudio;
use Flarum\Extend;
use Flarum\Frontend\Document;
use s9e\TextFormatter\Configurator;
return [
(new Extend\Frontend('forum'))
->content(function (Document $document) { $document->head[] = '<script src="/forum/assets/extensions/zerosonesfun-inline-audio/sm2.js"></script><script src="/forum/assets/extensions/zerosonesfun-inline-audio/inline-player.js"></script><script src="/forum/assets/extensions/zerosonesfun-inline-audio/reboot.js"></script>'; })
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/resources/less/forum.less'),
new Extend\Locales(__DIR__ . '/resources/locale'),
(new Extend\Formatter)
->configure(function (Configurator $config) {
$config->BBCodes->addCustom(
'[player]{URL}[/player]',
'<a href="{URL}">{URL}</a>'
);
})
];