3 * Name: Syntax Highlighting
4 * Description: Highlights syntax of code blocks with highlight.js
6 * Author: Hypolite Petovan <hypolite@mrpetovan.com>
10 use Friendica\Core\Hook;
13 function highlightjs_install()
15 Hook::register('head' , __FILE__, 'highlightjs_head');
16 Hook::register('footer', __FILE__, 'highlightjs_footer');
19 function highlightjs_head(App $a, &$b)
21 if ($a->getCurrentTheme() == 'frio') {
27 DI::page()->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css');
30 function highlightjs_footer(App $a, &$b)
32 DI::page()->registerFooterScript(__DIR__ . '/asset/highlight.pack.js');
33 DI::page()->registerFooterScript(__DIR__ . '/highlightjs.js');