Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cmd/age-keyserver/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ <h2>Submit or manage your key</h2>
resultDiv.innerHTML = '<p style="margin-top: 1rem;" class="error">Error looking up key.</p>';
}
});

function initLookupFromQuery() {
const params = new URLSearchParams(document.location.search);
const emailParam = params.get("email");
if (emailParam !== null) {
document.getElementById('lookup-email').value = emailParam;
document.getElementById('lookup-form').requestSubmit();
}
}

if (document.readyState === 'loading') {
document.addEventListener("DOMContentLoaded", initLookupFromQuery);
} else {
initLookupFromQuery();
}
</script>
</body>
</html>