diff --git a/searx/static/themes/simple/js/oneko.js b/searx/static/themes/simple/js/oneko.js index 4dc890775..6c3754e6e 100644 --- a/searx/static/themes/simple/js/oneko.js +++ b/searx/static/themes/simple/js/oneko.js @@ -105,11 +105,19 @@ document.body.appendChild(nekoEl); - document.addEventListener("mousemove", function (event) { + // Attach event listeners for both desktop and mobile + document.addEventListener('mousemove', function (event) { mousePosX = event.clientX; mousePosY = event.clientY; }); + document.addEventListener('touchmove', function (event) { + // Use the first touch point (primary touch) + const touch = event.touches[0]; + mousePosX = touch.clientX; + mousePosY = touch.clientY; + }, { passive: false }); // Allow preventing default if needed + window.requestAnimationFrame(onAnimationFrame); }