From 27d16882ed6f94f90f9bf48b42bae4619b936c77 Mon Sep 17 00:00:00 2001 From: elias Date: Fri, 3 Oct 2025 10:43:30 +0200 Subject: [PATCH] Add script.js --- script.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 script.js diff --git a/script.js b/script.js new file mode 100644 index 0000000..27d7614 --- /dev/null +++ b/script.js @@ -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 }); +})(); \ No newline at end of file