avoid loading inbox by default/blur input on enter key

This commit is contained in:
Emil Lerch 2025-10-15 20:03:41 -07:00
parent 777f0a1016
commit 9038231fee
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -255,12 +255,17 @@ function escapeHtml(text) {
window.addEventListener('DOMContentLoaded', () => {
const params = new URLSearchParams(location.search);
const query = params.get('q') || 'tag:inbox';
const query = params.get('q');
document.getElementById('search').value = query;
loadThreads(query);
if (query !== '') {
loadThreads(query);
}
document.getElementById('search').addEventListener('keypress', (e) => {
if (e.key === 'Enter') search();
if (e.key === 'Enter') {
search();
e.target.blur();
}
});
document.addEventListener('keydown', (e) => {