Castora logo

Castora

Login with passkey
Click to use your passkey:

Login with username/password
, own Bootstrap bundle), so the // two bits of the deleted scripts.js it actually used live here. document.addEventListener("DOMContentLoaded", () => { if (window.feather) feather.replace(); document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(el => new bootstrap.Tooltip(el)); }); document.addEventListener("DOMContentLoaded", () => { const passwordInput = document.getElementById("inputLoginPassword"); const passkeyBtn = document.getElementById("loginPasskey"); const passwordBtn = document.getElementById("loginPassword"); var passkeyused = localStorage.getItem('cuttle_passkey'); if (passkeyused) { var button = document.getElementById("showblock"); button.classList.add("shake"); button.style.display = "inline-block"; if (document.referrer.indexOf(location.protocol + "//" + location.host) !== 0) { passkeyBtn.click(); } } function toggleLoginButtons() { if (passwordInput.value.trim() === "") { passkeyBtn.style.display = "inline-block"; passwordBtn.style.display = "none"; } else { passkeyBtn.style.display = "none"; passwordBtn.style.display = "inline-block"; } } passwordInput.addEventListener("keydown", (event) => { if (event.key === "Escape" && passwordInput.value.trim() === "") { event.preventDefault(); document.getElementById("loginPasskey").click(); } }); const emailInput = document.getElementById("inputLoginEmailAddress"); emailInput.addEventListener("keydown", (event) => { if (event.key === "Escape" && passwordInput.value.trim() === "") { event.preventDefault(); document.getElementById("loginPasskey").click(); } }); }); function loginFocus() { if (!document.getElementById('inputLoginEmailAddress').value) { var useremail = localStorage.getItem('email'); if (useremail) { document.getElementById('inputLoginEmailAddress').value = useremail; document.getElementById('inputLoginPassword').focus(); } else { document.getElementById('inputLoginEmailAddress').focus(); } } else { document.getElementById('inputLoginPassword').focus(); } } const e = document.getElementById.bind(document); function dismissMessage() { let d = e("messageDismiss"); if (d) d.click(); } function toLogin(dontDismiss) { if (!dontDismiss) dismissMessage(); e("login-card").style.display = "block"; e("reset-card").style.display = "none"; loginFocus(); } function toReset(dontDismiss) { if (!dontDismiss) dismissMessage(); e("login-card").style.display = "none"; e("reset-card").style.display = "block"; if (e("inputLoginEmailAddress").value !== "") { e("inputResetEmailAddress").value = e("inputLoginEmailAddress").value; } e("inputResetEmailAddress").focus(); } toLogin(true);