aboutsummaryrefslogtreecommitdiff
path: root/search-manager.js
blob: 6823608eb03e616cf3af4f5a4833fcb017b79623 (plain)
1
2
3
4
5
6
7
8
9
10
11
document.getElementById("searchInput").addEventListener("keyup", function (event) {
    if (event.keyCode === 13) {
        event.preventDefault();
        document.getElementById("searchBtn").click();
    }
});
document.getElementById("searchBtn").addEventListener("click", function (event) {
    console.log("t");
    let text = document.getElementById("searchInput").value;
    window.location.href = "https://duckduckgo.com/?q=" + text;
});