From: Pascal Deklerck Date: Wed, 13 Jun 2018 07:06:14 +0000 (+0200) Subject: Code standards update for mathjax add-on changes (5118) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fd894984cf3692e682034f410e11553aa970c9cd;p=friendica-addons.git Code standards update for mathjax add-on changes (5118) --- diff --git a/mathjax/mathjax.js b/mathjax/mathjax.js index 1ab5531b..686f21bb 100644 --- a/mathjax/mathjax.js +++ b/mathjax/mathjax.js @@ -1,5 +1,5 @@ -Addon_registerHook("postprocess","mathjax_postprocess_liveupdate"); +Addon_registerHook("postprocess_liveupdate", "mathjax_postprocess_liveupdate"); function mathjax_postprocess_liveupdate() { - MathJax.Hub.Queue(["Typeset",MathJax.Hub]); + MathJax.Hub.Queue(["Typeset", MathJax.Hub]); } diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index 37b2748c..ebc49d98 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -16,20 +16,21 @@ function mathjax_install() { Addon::registerHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header'); Addon::registerHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); Addon::registerHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); - Addon::registerHook('template_vars','addon/mathjax/mathjax.php', 'mathjax_template_vars'); + Addon::registerHook('template_vars', 'addon/mathjax/mathjax.php', 'mathjax_template_vars'); logger('installed js_math addon'); } -function mathjax_template_vars($a, &$arr) { - $arr['vars']['addon_hooks'][] = "mathjax"; -} - function mathjax_uninstall() { Addon::unregisterHook('page_header', 'addon/mathjax/mathjax.php', 'mathjax_page_header'); Addon::unregisterHook('addon_settings', 'addon/mathjax/mathjax.php', 'mathjax_settings'); Addon::unregisterHook('addon_settings_post', 'addon/mathjax/mathjax.php', 'mathjax_settings_post'); Addon::unregisterHook('template_vars','addon/mathjax/mathjax.php', 'mathjax_template_vars'); } + +function mathjax_template_vars($a, &$arr) { + $arr['vars']['addon_hooks'][] = "mathjax"; +} + function mathjax_settings_post ($a, $post) { if (! local_user()) return;