]> git.mxchange.org Git - friendica-addons.git/blobdiff - highlightjs/highlightjs.php
IT translation update blackout addon THX Sylke Vicious
[friendica-addons.git] / highlightjs / highlightjs.php
index 258cb4ad156f0ca29cafcfc79db39b0c5514eb30..c46c26aed7bef7f628d198f940542aa94f2396de 100644 (file)
@@ -8,6 +8,7 @@
 
 use Friendica\App;
 use Friendica\Core\Hook;
+use Friendica\DI;
 
 function highlightjs_install()
 {
@@ -15,12 +16,6 @@ function highlightjs_install()
        Hook::register('footer', __FILE__, 'highlightjs_footer');
 }
 
-function highlightjs_uninstall()
-{
-       Hook::unregister('head'  , __FILE__, 'highlightjs_head');
-       Hook::unregister('footer', __FILE__, 'highlightjs_footer');
-}
-
 function highlightjs_head(App $a, &$b)
 {
        if ($a->getCurrentTheme() == 'frio') {
@@ -29,11 +24,11 @@ function highlightjs_head(App $a, &$b)
                $style = 'default';
        }
 
-       $a->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css');
+       DI::page()->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css');
 }
 
 function highlightjs_footer(App $a, &$b)
 {
-       $a->registerFooterScript(__DIR__ . '/asset/highlight.pack.js');
-       $a->registerFooterScript(__DIR__ . '/highlightjs.js');
+       DI::page()->registerFooterScript(__DIR__ . '/asset/highlight.pack.js');
+       DI::page()->registerFooterScript(__DIR__ . '/highlightjs.js');
 }