added 'mini-menu' to result pages
Some checks failed
Run Integration Tests / test (push) Failing after 36s

This commit is contained in:
partisan 2024-12-07 23:07:19 +01:00
parent 7e573e6928
commit 287c7a7a1d
12 changed files with 266 additions and 189 deletions

View file

@ -24,10 +24,15 @@ document.addEventListener('DOMContentLoaded', function () {
// Theme change event listeners
document.getElementById('dark_theme').addEventListener('click', function () {
window.location.href = '/search?theme=dark';
const currentUrl = new URL(window.location.href); // Get the current URL
currentUrl.searchParams.set('theme', 'dark'); // Add or update the 'theme' parameter
window.location.href = currentUrl.toString(); // Redirect to the updated URL
});
document.getElementById('light_theme').addEventListener('click', function () {
window.location.href = '/search?theme=light';
const currentUrl = new URL(window.location.href); // Get the current URL
currentUrl.searchParams.set('theme', 'light'); // Add or update the 'theme' parameter
window.location.href = currentUrl.toString(); // Redirect to the updated URL
});
// Event listener for Safe Search Selection