aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJosh B <[email protected]>2020-06-01 00:38:37 +1000
committerJosh B <[email protected]>2020-06-01 00:38:37 +1000
commit3c56240e5fcbee02e45f50e23f47a558b3800fdc (patch)
tree8a761f92a024558c891ec974d78da635935331cb /docs
parentFirst pass at double header display (diff)
downloaddiscord.py-3c56240e5fcbee02e45f50e23f47a558b3800fdc.tar.xz
discord.py-3c56240e5fcbee02e45f50e23f47a558b3800fdc.zip
Fix sidebar active link selection
Diffstat (limited to 'docs')
-rw-r--r--docs/_static/custom.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/_static/custom.js b/docs/_static/custom.js
index 9b3ed5bc..ea3fbe27 100644
--- a/docs/_static/custom.js
+++ b/docs/_static/custom.js
@@ -61,7 +61,7 @@ Object.entries(settings).forEach(([name, setter]) => {
document.addEventListener('DOMContentLoaded', () => {
bottomHeightThreshold = document.documentElement.scrollHeight - 30;
- sections = document.querySelectorAll('div.section');
+ sections = document.querySelectorAll('section');
settingsModal = document.querySelector('div#settings.modal');
hamburgerToggle = document.getElementById("hamburger-toggle");
sidebar = document.getElementById("sidebar");
@@ -129,7 +129,7 @@ window.addEventListener('scroll', () => {
}
if (currentSection) {
- activeLink = document.querySelector(`.sphinxsidebar a[href="#${currentSection.id}"]`);
+ activeLink = document.querySelector(`#sidebar a[href="#${currentSection.id}"]`);
if (activeLink) {
activeLink.parentElement.classList.add('active');
}