mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-25 15:38:21 -05:00
11 lines
223 B
JavaScript
11 lines
223 B
JavaScript
let search_box = document.querySelector('input')
|
|
function search_web() {
|
|
window.location = `search?q=${search_box.value}`
|
|
}
|
|
|
|
search_box.addEventListener('keyup', (e) => {
|
|
if (e.keyCode === 13) {
|
|
search_web()
|
|
}
|
|
})
|