summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/sidebar/article-menu.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/_includes/sidebar/article-menu.html b/_includes/sidebar/article-menu.html
index 215e808..2e273de 100644
--- a/_includes/sidebar/article-menu.html
+++ b/_includes/sidebar/article-menu.html
@@ -36,8 +36,13 @@
// The header element
var header = document.querySelector('header.site-header');
- function doMenuCollapse(index) {
+ function doMenuCollapse(index, over_items=20) {
var items = menuContent.firstChild.children;
+
+ if (items.length < over_items) {
+ return;
+ }
+
var activeItem = items[index];
var beginItem = activeItem
var endItem = activeItem