aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/scripts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-06 03:51:11 +0300
committerGravatar Vitaly Takmazov2018-12-06 03:51:11 +0300
commite0e9ad7ee705a0b145ec97e85d10492f5af36134 (patch)
tree963686425d9091f361be7f47160056a40444afac /src/main/assets/scripts.js
parent2b0133c4ee9a5b9855c3a773b8082a3c52f44c25 (diff)
Tabs with active tab
Diffstat (limited to 'src/main/assets/scripts.js')
-rw-r--r--src/main/assets/scripts.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js
index 9ee0639e..32888279 100644
--- a/src/main/assets/scripts.js
+++ b/src/main/assets/scripts.js
@@ -867,6 +867,14 @@ ready(function() {
}), 100);
}
});
+ let location = window.location.href;
+ document.querySelectorAll('#global li a').forEach(el => {
+ if (el.href === location) {
+ el.classList.add('active');
+ el.parentNode.classList.add('active');
+ el.parentNode.setAttribute('aria-disabled', 'true');
+ }
+ });
initES();
embedAll();