mirror of
https://github.com/benbusby/whoogle-search
synced 2024-11-18 09:25:33 +00:00
dcb80ac250
Introduces a new content security policy header for responses to all requests to reduce the possibility of ip leaks to outside connections. By default blocks all inline scripts, and only allows content loaded from Whoogle. Refactors a few small inline scripting cases in the project to their own individual scripts.
12 lines
351 B
JavaScript
12 lines
351 B
JavaScript
document.addEventListener("DOMContentLoaded", () => {
|
|
const searchBar = document.getElementById("search-bar");
|
|
|
|
searchBar.addEventListener("keyup", function (event) {
|
|
if (event.keyCode !== 13) {
|
|
handleUserInput(searchBar);
|
|
} else {
|
|
document.getElementById("search-form").submit();
|
|
}
|
|
});
|
|
});
|