summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
Diffstat (limited to '_includes')
-rw-r--r--_includes/extensions/hashlocate.html2
-rw-r--r--_includes/sidebar/article-menu.html6
2 files changed, 6 insertions, 2 deletions
diff --git a/_includes/extensions/hashlocate.html b/_includes/extensions/hashlocate.html
index 5194273..fd4a3d6 100644
--- a/_includes/extensions/hashlocate.html
+++ b/_includes/extensions/hashlocate.html
@@ -36,7 +36,7 @@
// The first event occurred
window.addEventListener('click', function(event) {
- if (event.target.matches('a')) {
+ if (event.target.tagName.toLowerCase() == 'a') {
hashLocate(event.target.getAttribute('href'));
}
});
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;
}