10000
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 6529334 commit 7cc8703Copy full SHA for 7cc8703
doc/api_assets/api.js
@@ -187,6 +187,20 @@
187
});
188
}
189
190
+ function setupSidebarScroll() {
191
+ const sidebarLinks = document.querySelectorAll('#column2 a');
192
+
193
+ let link;
194
+ for (link of sidebarLinks) {
195
+ if (link.pathname === window.location.pathname) break;
196
+ }
197
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