kou commented on code in PR #979:
URL: https://github.com/apache/arrow-adbc/pull/979#discussion_r1295091387
##########
docs/source/_static/version.js:
##########
@@ -65,4 +72,10 @@ window.addEventListener("DOMContentLoaded", () => {
return false;
});
});
-});
+};
+
+if (document.readyState !== "loading") {
+ adbcInjectVersionSwitcher();
+} else {
+ window.addEventListener("DOMContentLoaded", () =>
adbcInjectVersionSwitcher());
Review Comment:
Can we simplify this?
```suggestion
window.addEventListener("DOMContentLoaded", adbcInjectVersionSwitcher);
```
##########
docs/source/_static/version.js:
##########
@@ -48,7 +51,11 @@ window.addEventListener("DOMContentLoaded", () => {
el.addEventListener("click", (e) => {
e.preventDefault();
try {
- const relativePart =
window.location.pathname.replace(/^\/[^\/]+\//, "");
+ let relativePart = window.location.pathname;
+ // Remove the adbc/ prefix
Review Comment:
```suggestion
// Remove the /adbc/ prefix
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]