refactor: remove VLESS/Xray, Hy2-only stack
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-3
@@ -72,15 +72,14 @@ document.querySelectorAll(".copy-row").forEach((row) => {
|
||||
btn.addEventListener("click", async () => {
|
||||
const card = row.closest(".node-card");
|
||||
const nodeId = card?.dataset.id;
|
||||
const kind = btn.dataset.linkKind || input.dataset.linkKind || "vless";
|
||||
let text = input.value;
|
||||
|
||||
if (nodeId) {
|
||||
try {
|
||||
const nodes = await fetchNodeLinks();
|
||||
const node = nodes.find((item) => String(item.id) === String(nodeId));
|
||||
if (node?.links) {
|
||||
text = kind === "hy2" ? node.links.hy2 : node.links.vless;
|
||||
if (node?.links?.hy2) {
|
||||
text = node.links.hy2;
|
||||
}
|
||||
} catch {
|
||||
/* fall back to input.value */
|
||||
|
||||
Reference in New Issue
Block a user