Обновить example.html

This commit is contained in:
2025-05-23 14:30:53 +00:00
parent 5756a77d6c
commit 48f507f7dd

View File

@@ -27,10 +27,9 @@
document.getElementById('getSecretValue').addEventListener('click', async () => { document.getElementById('getSecretValue').addEventListener('click', async () => {
const userAgent = document.getElementById('userAgent').value || navigator.userAgent; const userAgent = document.getElementById('userAgent').value || navigator.userAgent;
const url = document.getElementById('url').value || window.location.href;
const serverTs = await fetchServerTimestamp() const serverTs = await fetchServerTimestamp()
const secretValue = await get_secret_value(BigInt(serverTs.timestamp), userAgent, url); const secretValue = await get_secret_value(BigInt(serverTs.timestamp), userAgent, '/api/v1/guestlogin');
console.log(secretValue) console.log(secretValue)
document.getElementById('result').innerText = secretValue; document.getElementById('result').innerText = secretValue;