Last active
January 31, 2025 04:00
-
-
Save marsa099/bc4f29539459929b58906af0ce1ac6e0 to your computer and use it in GitHub Desktop.
Paste this in chrome dev tools console to simulate mouse movement every 5 sec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open Developer Tools in the Microsoft Teams tab, | |
// paste this code in the Console, and press Enter to simulate activity. | |
// Make sure you allow pasting. You will get a warning if pasting is disabled | |
// Stop script by setting keepAlive = false | |
let keepAlive = true; | |
function simulateMouseMove() { | |
if (!keepAlive) return; | |
const event = new MouseEvent('mousemove', { | |
bubbles: true, | |
cancelable: true, | |
clientX: Math.random() * window.innerWidth, | |
clientY: Math.random() * window.innerHeight, | |
}); | |
console.log("Movement"); | |
document.dispatchEvent(event); | |
} | |
setInterval(simulateMouseMove, 5000); | |
function stopKeepAlive() { | |
keepAlive = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment