friendica-addons-sekb/showmore_dyn/showmore_dyn.php

35 lines
738 B
PHP
Raw Normal View History

2020-03-12 22:24:54 +00:00
<?php
/**
* Name: Showmore Dynamic
* Description: Dynamically limits height of posts
* Version: 1.0
* Author: Christian Wiwie
*
*/
use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
function showmore_dyn_install() {
Hook::register('head' , __FILE__, 'showmore_dyn_head');
2020-03-13 21:09:21 +00:00
Hook::register('footer', __FILE__, 'showmore_dyn_footer');
2020-03-12 22:24:54 +00:00
}
function showmore_dyn_uninstall()
{
Hook::unregister('head' , __FILE__, 'showmore_dyn_head');
2020-03-13 21:09:21 +00:00
Hook::unregister('footer', __FILE__, 'showmore_dyn_footer');
2020-03-12 22:24:54 +00:00
}
function showmore_dyn_head(App $a, &$b)
{
2020-03-13 21:09:21 +00:00
DI::page()->registerStylesheet(__DIR__ . '/showmore_dyn.css');
2020-03-12 22:24:54 +00:00
}
function showmore_dyn_footer(App $a, &$b)
{
2020-03-13 21:09:21 +00:00
DI::page()->registerFooterScript(__DIR__ . '/showmore_dyn.js');
2020-03-12 22:24:54 +00:00
}