Add script.js
This commit is contained in:
26
script.js
Normal file
26
script.js
Normal 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 });
|
||||||
|
})();
|
Reference in New Issue
Block a user