First full release

This commit is contained in:
Luka Romih
2023-03-10 12:50:23 +01:00
parent 257f3c354f
commit 9867875ef2
285 changed files with 10980 additions and 4692 deletions
@@ -0,0 +1,26 @@
// Note to myself: please optimize and remove the redundacy of the code written in multiple classes to achieve the same result as this
const focusOnCompletePromtBase = queryInput => {
queryInput.focus()
queryInput.select()
}
// Tradeoff: Declare a variable for the element to reduce duplication?
const inputQuery = document.querySelector('#search-query')
if (inputQuery) {
focusOnCompletePromtBase(inputQuery)
if (window.location.pathname === '/slovarji') {
document
.querySelector('#dicts-search-btn')
.addEventListener('click', () => {
focusOnCompletePromtBase(inputQuery)
})
document
.querySelector('#search-in-filter-modal')
.addEventListener('click', () => {
focusOnCompletePromtBase(inputQuery)
})
}
}