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 790489c commit c5645adCopy full SHA for c5645ad
doc/api_assets/api.js
@@ -187,6 +187,20 @@
187
});
188
}
189
190
+ function setupSidebarScroll() {
191
+ const sidebar = document.querySelector('#column2');
192
+ if (!sidebar) return;
193
+
194
+ const currentModule = window.location.pathname.split('/').pop();
195
+ if (!currentModule) return;
196
197
+ const link = sidebar.querySelector(`a[href="${currentModule}"]`);
198
+ if (!link) return;
199
200
+ link.scrollIntoView({ block: 'center' });
201
+ }
202
203
204
function bootstrap() {
205
// Check if we have JavaScript support.
206
document.documentElement.classList.add('has-js');
@@ -206,6 +220,8 @@
220
setupFlavorToggles();
207
221
208
222
setupCopyButton();
223
224
+ setupSidebarScroll();
209
225
210
226
211
227
if (document.readyState === 'loading') {
0 commit comments