This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/asf-site by this push:
new bbfc739 publish documentation
bbfc739 is described below
commit bbfc7395671c639b89a1df260fe66e144f8bff04
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Mar 21 19:52:05 2023 +0000
publish documentation
---
main/_static/version.js | 20 ++++++++++++++++++++
version.js | 20 ++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/main/_static/version.js b/main/_static/version.js
index 0f63def..51ade78 100644
--- a/main/_static/version.js
+++ b/main/_static/version.js
@@ -44,5 +44,25 @@ window.addEventListener("DOMContentLoaded", () => {
const li = document.createElement("li");
li.appendChild(el);
root.appendChild(li);
+
+ el.addEventListener("click", (e) => {
+ e.preventDefault();
+ try {
+ const relativePart =
window.location.pathname.replace(/^\/[^\/]+\//, "");
+ const newUrl =
`${el.getAttribute("href")}/${relativePart}`;
+ window.fetch(newUrl).then((resp) => {
+ if (resp.status === 200) {
+ window.location.href = newUrl;
+ } else {
+ window.location.href = el.getAttribute("href");
+ }
+ }, () => {
+ window.location.href = el.getAttribute("href");
+ });
+ } catch (e) {
+ window.location.href = el.getAttribute("href");
+ }
+ return false;
+ });
});
});
diff --git a/version.js b/version.js
index 35c34d3..0bb89de 100644
--- a/version.js
+++ b/version.js
@@ -44,6 +44,26 @@ window.addEventListener("DOMContentLoaded", () => {
const li = document.createElement("li");
li.appendChild(el);
root.appendChild(li);
+
+ el.addEventListener("click", (e) => {
+ e.preventDefault();
+ try {
+ const relativePart =
window.location.pathname.replace(/^\/[^\/]+\//, "");
+ const newUrl =
`${el.getAttribute("href")}/${relativePart}`;
+ window.fetch(newUrl).then((resp) => {
+ if (resp.status === 200) {
+ window.location.href = newUrl;
+ } else {
+ window.location.href = el.getAttribute("href");
+ }
+ }, () => {
+ window.location.href = el.getAttribute("href");
+ });
+ } catch (e) {
+ window.location.href = el.getAttribute("href");
+ }
+ return false;
+ });
});
});