diff --git a/docs/website/src/pages/self-hosting/header/index.scss b/docs/website/src/pages/self-hosting/header/index.scss
index 1f9c0bd3df2..bc57055a263 100644
--- a/docs/website/src/pages/self-hosting/header/index.scss
+++ b/docs/website/src/pages/self-hosting/header/index.scss
@@ -105,6 +105,7 @@
border-radius: 4px;
background: rgba(255, 255, 255, 0.2);
filter: blur(4px);
+ pointer-events: none;
}
.start-now-button {
@@ -242,6 +243,7 @@
border-radius: 4px;
background: rgba(255, 255, 255, 0.2);
filter: blur(4px);
+ pointer-events: none;
}
.start-now-button {
diff --git a/docs/website/static/global.js b/docs/website/static/global.js
new file mode 100644
index 00000000000..be5e7bca225
--- /dev/null
+++ b/docs/website/static/global.js
@@ -0,0 +1,23 @@
+document.addEventListener("DOMContentLoaded", function () {
+ console.log('addEventListener')
+ const parentElement = document.body
+ parentElement.addEventListener("click", function (event) {
+ if (event.target.tagName === "A") {
+ const href = event.target.getAttribute("href")
+ const currentHostname = window.location.hostname
+ const bdId = sessionStorage.getItem("bd_vid")
+ console.log(bdId, 'bd_vid')
+ if (href.includes("sealos.io") || href.includes("sealos.top") || href.includes("sealos.run")) {
+ event.preventDefault()
+ console.log("特殊处理链接: " + href)
+
+ const targetHostname = (currentHostname === "sealos.io") ? "sealos.io" : "sealos.top"
+ const modifiedHref = href.replace("sealos.io", targetHostname)
+ console.log(modifiedHref, '修改后的链接')
+
+ event.target.href = modifiedHref
+ window.open(modifiedHref)
+ }
+ }
+ })
+})
diff --git a/docs/website/yarn.lock b/docs/website/yarn.lock
index 7d3088d3bae..0d5f203176f 100644
--- a/docs/website/yarn.lock
+++ b/docs/website/yarn.lock
@@ -3661,6 +3661,11 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"
+dotenv@^16.3.1:
+ version "16.3.1"
+ resolved "https://registry.npmmirror.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
+
duplexer3@^0.1.4:
version "0.1.5"
resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz"