Files
lash/templates/share.html
vxclutch 7ee19a2883 save
2026-05-27 18:52:37 -04:00

48 lines
971 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lash v{{.Version}}</title>
</head>
<body>
<h1>Enter Token</h1>
<input
type="text"
id="tokenInput"
placeholder="Enter token"
/>
<button id="submitBtn">
Submit
</button>
<p id="status"></p>
<script>
const tokenInput = document.getElementById('tokenInput');
const submitBtn = document.getElementById('submitBtn');
const status = document.getElementById('status');
submitBtn.addEventListener('click', async () => {
const token = tokenInput.value.trim();
if (!token) {
status.textContent = 'Please enter a token.';
return;
}
const response = await fetch('/api/receive-token', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ token })
});
});
</script>
</body>
</html>