mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-11 19:08:49 +00:00
#8374: Initial implementation as addon
This commit is contained in:
parent
b11e418f35
commit
8ff88b2eee
3 changed files with 151 additions and 0 deletions
34
showmore_dyn/showmore_dyn.php
Normal file
34
showmore_dyn/showmore_dyn.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?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');
|
||||
Hook::register('footer', __FILE__, 'showmore_dyn_footer');
|
||||
}
|
||||
|
||||
function showmore_dyn_uninstall()
|
||||
{
|
||||
Hook::unregister('head' , __FILE__, 'showmore_dyn_head');
|
||||
Hook::unregister('footer', __FILE__, 'showmore_dyn_footer');
|
||||
}
|
||||
|
||||
function showmore_dyn_head(App $a, &$b)
|
||||
{
|
||||
DI::page()->registerStylesheet(__DIR__ . '/showmore_dyn.css');
|
||||
}
|
||||
|
||||
function showmore_dyn_footer(App $a, &$b)
|
||||
{
|
||||
DI::page()->registerFooterScript(__DIR__ . '/showmore_dyn.js');
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue