()
| 399 | |
| 400 | // Eventhandler for keyevents while the searchbar is focused |
| 401 | function searchbarKeyUpHandler() { |
| 402 | var searchterm = searchbar.value.trim(); |
| 403 | if (searchterm != "") { |
| 404 | searchbar.classList.add("active"); |
| 405 | doSearch(searchterm); |
| 406 | } else { |
| 407 | searchbar.classList.remove("active"); |
| 408 | showResults(false); |
| 409 | removeChildren(searchresults); |
| 410 | } |
| 411 | |
| 412 | setSearchUrlParameters(searchterm, "push_if_new_search_else_replace"); |
| 413 | |
| 414 | // Remove marks |
| 415 | marker.unmark(); |
| 416 | } |
| 417 | |
| 418 | // Update current url with ?URL_SEARCH_PARAM= parameter, remove ?URL_MARK_PARAM and #heading-anchor . |
| 419 | // `action` can be one of "push", "replace", "push_if_new_search_else_replace" |
no test coverage detected