Skip to content

Commit

Permalink
Update start.html
Browse files Browse the repository at this point in the history
  • Loading branch information
b4k3s authored Oct 25, 2023
1 parent 86cbce5 commit e5c0c77
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions start.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@
</head>
<body>
<div class="container">
<form action="https://duckduckgo.com/">
<input type="text" name="q" id="search" required>
<input type="hidden" name="ia" value="web">
<form id="search-form" onsubmit="performSearch(); return false;">
<input type="text" id="search" required>
</form>
</div>

<link href='styles.css?version=1' rel='stylesheet'></link>

<script>
const searchInput = document.getElementById('search');

function performSearch() {
const searchTerm = document.getElementById("search").value;
const searchURL = "https://duckduckgo.com/?q=" + encodeURIComponent(searchTerm) + "&ia=web";
window.location.href = searchURL;
}

searchInput.focus();

window.addEventListener('beforeunload', function(event) {
Expand Down

0 comments on commit e5c0c77

Please sign in to comment.