diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-09-25 16:22:22 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-09-25 16:23:24 +0200 |
| commit | f976f95b502cb6f16efcc2541d954df2d747f6ca (patch) | |
| tree | 290c3c8c9aae3ab660f941280475e11810fbcfbe /assets | |
| parent | fd91d8b9263426849e3716766ec300f836cbf7dc (diff) | |
| download | gohugo-theme-ed-f976f95b502cb6f16efcc2541d954df2d747f6ca.tar.gz | |
Small code cleanup
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/ed.js | 2 | ||||
| -rw-r--r-- | assets/js/search.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/assets/js/ed.js b/assets/js/ed.js index 4bf71c2..b4ba4d6 100644 --- a/assets/js/ed.js +++ b/assets/js/ed.js @@ -17,7 +17,7 @@ function setupBackToTop() { function setupHypothes() { const hypothesisContainer = document.querySelector('.hypothesis-container'); if (hypothesisContainer !== null) { - hypothesisContainer.addEventListener('click', (e) => { + hypothesisContainer.addEventListener('click', e => { e.preventDefault(); let script = document.createElement('script'); diff --git a/assets/js/search.js b/assets/js/search.js index c8a8ed8..7818f50 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -332,7 +332,7 @@ document.addEventListener('DOMContentLoaded', () => { } searchForm.addEventListener('submit', e => e.preventDefault()); - searchInput.addEventListener('keyup', (e) => { + searchInput.addEventListener('keyup', e => { e.preventDefault(); const query = document.getElementById('search') .value @@ -341,7 +341,7 @@ document.addEventListener('DOMContentLoaded', () => { handleSearchQuery(query); }); - searchInput.addEventListener('input', (e) => { + searchInput.addEventListener('input', e => { if (!e.currentTarget.value) { hideSearchResults(); } |
