Add script.js

This commit is contained in:
2025-10-03 10:43:30 +02:00
commit 27d16882ed

26
script.js Normal file
View File

@@ -0,0 +1,26 @@
// ==UserScript==
// @name human
// @version 1.0
// @description :p
// @match https://humanbenchmark.com/tests/reactiontime
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
const CLICK_DELAY_MS = 100;
const observer = new MutationObserver(() => {
const greenScreen = document.querySelector('.view-go');
if (greenScreen) {
setTimeout(() => {
const event = new MouseEvent('mousedown', { bubbles: true, cancelable: true, view: window });
greenScreen.dispatchEvent(event);
}, CLICK_DELAY_MS);
}
});
observer.observe(document.documentElement, { childList: true, subtree: true });
})();