Update search.js
This commit is contained in:
parent
a873d59099
commit
e6df2cf5f4
1 changed files with 7 additions and 11 deletions
|
@ -3,17 +3,13 @@ window.onload = function() {
|
|||
}
|
||||
|
||||
function initSearchBar() {
|
||||
const searchBarInput = document.getElementById("search-bar-input")
|
||||
|
||||
searchBarInput.value = ""
|
||||
searchBarInput.focus()
|
||||
document.getElementById("search-bar-input").value = ""
|
||||
document.getElementById("search-bar-input").focus()
|
||||
|
||||
searchBarInput.addEventListener("keypress", (event) => {
|
||||
if (event.key !== 'Enter') return
|
||||
|
||||
const searchEnginer = "https://www.duckduckgo.com/?q="
|
||||
const endQuery = "&atb=v225-7&ia=web"
|
||||
|
||||
document.location = searchEnginer + searchBarInput.value.replace(/\ /g, "+") + endQuery
|
||||
document.getElementById("search-bar-input").addEventListener("keypress", (event) => {
|
||||
if (event.key != 'Enter') return
|
||||
googleSearchUrl = "https://gowogle.voring.me/search?q="
|
||||
query = document.getElementById("search-bar-input").value.replace(/\ /g, "+")
|
||||
document.location = googleSearchUrl + query + "&cookies_disabled=0"
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue