use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
+use Friendica\DI;
/**
* cookienotice_install
$stylesheetPath = __DIR__ . '/cookienotice.css';
$footerscriptPath = __DIR__ . '/cookienotice.js';
- $a->registerStylesheet($stylesheetPath);
- $a->registerFooterScript($footerscriptPath);
+ DI::page()->registerStylesheet($stylesheetPath);
+ DI::page()->registerFooterScript($footerscriptPath);
}
/**
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
+use Friendica\DI;
use Friendica\Util\ConfigFileLoader;
use Friendica\Util\Network;
use Friendica\Util\XML;
/* Add our stylesheet to the page so we can make our settings look nice */
$stylesheetPath = __DIR__ . '/geonames.css';
- $a->registerStylesheet($stylesheetPath);
+ DI::page()->registerStylesheet($stylesheetPath);
/* Get the current state of our config variable */
$enabled = intval(PConfig::get(local_user(), 'geonames', 'enable'));
use Friendica\App;
use Friendica\Core\Hook;
+use Friendica\DI;
function highlightjs_install()
{
$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');
}
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
+use Friendica\DI;
function mathjax_install()
{
// if the visitor of the page is not a local_user, use MathJax
// otherwise check the users settings.
if (!local_user() || PConfig::get(local_user(), 'mathjax', 'use', false)) {
- $a->registerFooterScript(__DIR__ . '/asset/MathJax.js?config=TeX-MML-AM_CHTML');
- $a->registerFooterScript(__DIR__ . '/mathjax.js');
+ DI::page()->registerFooterScript(__DIR__ . '/asset/MathJax.js?config=TeX-MML-AM_CHTML');
+ DI::page()->registerFooterScript(__DIR__ . '/mathjax.js');
}
}
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
+use Friendica\DI;
function pageheader_install() {
Hook::register('page_content_top', __FILE__, 'pageheader_fetch');
/* Add our stylesheet to the page so we can make our settings look nice */
$stylesheetPath = __DIR__ . '/pageheader.css';
- $a->registerStylesheet($stylesheetPath);
+ DI::page()->registerStylesheet($stylesheetPath);
$words = Config::get('pageheader','text');
if(! $words)
}
$stylesheetPath = __DIR__ .'/pageheader.css';
- $a->registerStylesheet($stylesheetPath);
+ DI::page()->registerStylesheet($stylesheetPath);
if ($s) {
$b .= '<div class="pageheader">' . $s . '</div>';