o3-2025-04-16· OpenAI
LMArena Human Preference 140K
Can you write a piece of js to just keep scrolling down until the user presses any key
- User
Can you write a piece of js to just keep scrolling down until the user presses any key
- Assistant
Here’s a tiny self-contained snippet you can paste in the browser console (or drop in a
<script>tag) to auto-scroll down the page until the user presses any key:(() => { /* CONFIG --------------------------------------------------------- */ const pixelsPerStep = 8; // How many pixels to scroll each “tick” const msBetweenSteps = 16; // 16 ms ≈ 60 fps /* ---------------------------------------------------------------- */ // Start auto-scrolling const id = setInterval(() => window.scrollBy(0, pixelsPerStep), msBetweenSteps); // Function that stops the interval and removes itself const stop = () => { clearInterval(id); window.removeEventListener('keydown', stop); console.log('✨ Auto-scroll stopped.'); }; // Listen for *any* key press window.addEventListener('keydown', stop); console.log('⏬ Auto-scroll started… (press any key to stop)'); })();
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.