diff options
author | jeffreytse <jeffreytse.mail@gmail.com> | 2020-10-03 12:23:29 +0800 |
---|---|---|
committer | jeffreytse <jeffreytse.mail@gmail.com> | 2020-10-03 12:23:29 +0800 |
commit | 023ba51a08acba9a46e201a8f6ebd29bc1b51c53 (patch) | |
tree | 51f3dda04c6113d04e8cf688caee6b062df7084e /_includes/sidebar/article-menu.html | |
parent | ba1db7db3e7bf97de56909b1f13592172d550552 (diff) |
perfect: improve browser compatibility
Diffstat (limited to '_includes/sidebar/article-menu.html')
-rw-r--r-- | _includes/sidebar/article-menu.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/_includes/sidebar/article-menu.html b/_includes/sidebar/article-menu.html index 2e273de..3e618ff 100644 --- a/_includes/sidebar/article-menu.html +++ b/_includes/sidebar/article-menu.html @@ -36,9 +36,13 @@ // The header element var header = document.querySelector('header.site-header'); - function doMenuCollapse(index, over_items=20) { + function doMenuCollapse(index, over_items) { var items = menuContent.firstChild.children; + if (over_items == undefined) { + over_items = 20; + } + if (items.length < over_items) { return; } |