Skip to content

Instantly share code, notes, and snippets.

@j0057
Last active October 3, 2025 08:56
Show Gist options
  • Select an option

  • Save j0057/6b7b6afed4c0a2786e95b55e7411ef57 to your computer and use it in GitHub Desktop.

Select an option

Save j0057/6b7b6afed4c0a2786e95b55e7411ef57 to your computer and use it in GitHub Desktop.
tab-jiggler.user.js
// ==UserScript==
// @name Tab jiggler
// @version 0.1
// @author Joost Molenaar <[email protected]>
// @match https://example.com/*
// @grant none
// ==/UserScript==
window.setInterval(() => {
document.dispatchEvent(new MouseEvent('mousemove', { bubbles: true
, cancelable: true
, view: window
, clientX: 100 + Math.random() * 10
, clientY: 100 + Math.random() * 10
}));
window.dispatchEvent(new FocusEvent('focus', { bubbles: true
, cancelable: true
}));
}, 8192);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment