We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5645ad commit e0a6c02Copy full SHA for e0a6c02
doc/api_assets/api.js
@@ -188,15 +188,15 @@
188
}
189
190
function setupSidebarScroll() {
191
- const sidebar = document.querySelector('#column2');
192
- if (!sidebar) return;
+ const sidebarLinks = document.querySelectorAll('#column2 a');
193
194
- const currentModule = window.location.pathname.split('/').pop();
195
- if (!currentModule) return;
+ let link;
+ for (link of sidebarLinks) {
+ if (link.pathname === window.location.pathname) break;
196
+ }
197
- const link = sidebar.querySelector(`a[href="${currentModule}"]`);
198
if (!link) return;
199
-
+
200
link.scrollIntoView({ block: 'center' });
201
202
0 commit comments