diff --git a/plugin.php b/plugin.php index b83b64c..fcb514a 100644 --- a/plugin.php +++ b/plugin.php @@ -2,10 +2,11 @@ class PluginBluditToc extends Plugin { public function init() { - $this->dbFields = array( + $this->name = 'Table of Contents'; + $this->description = 'Sticky ToC sidebar (desktop) and floating drawer (mobile) from article headings.'; + $this->dbFields = array( 'title' => 'On this page', 'navbarHeight' => 80, - 'minWidth' => 1280, ); } @@ -14,7 +15,6 @@ class PluginBluditToc extends Plugin { $title = htmlspecialchars($this->getValue('title'), ENT_QUOTES, 'UTF-8'); $navbarHeight = (int) $this->getValue('navbarHeight'); - $minWidth = (int) $this->getValue('minWidth'); $h = ''; @@ -26,13 +26,7 @@ class PluginBluditToc extends Plugin { $h .= '
'; $h .= ''; $h .= ''; - $h .= '' . $L->get('Pixel offset applied to heading anchors to clear a fixed navbar.') . ''; - $h .= '
'; - - $h .= '
'; - $h .= ''; - $h .= ''; - $h .= '' . $L->get('Below this width the mobile floating button is shown instead.') . ''; + $h .= '' . $L->get('Pixel offset so heading anchors clear a fixed navbar.') . ''; $h .= '
'; return $h; @@ -40,11 +34,10 @@ class PluginBluditToc extends Plugin { public function siteHead() { return '