chrome_openfront.uildassistant.mp4
A highly optimized, hardware-level event emulator designed as a Google Chrome Extension. It automates high-frequency repetitive tasks (such as building upgrades) in canvas-based web games, specifically targeting the OpenFront engine architecture.
Browser game engines utilizing Canvas/WebGL often implement strict anti-cheat mechanisms that intercept isTrusted: false events and monitor input event lifecycles. Traditional Content Scripts fail in these environments due to Chrome's Isolated World constraints.
This extension bypasses those limitations by utilizing a payload injection pattern. The content.js script dynamically injects inject.js directly into the DOM tree. This grants the script execution rights within the host page's context, allowing it to:
- Seamlessly hook into the engine's global input handlers during the Capture Phase.
- Avoid recursive feedback loops by accurately distinguishing between physical
isTrustedkeystrokes and self-generated synthetic macros. - Dispatch raw
KeyboardEventandMouseEventlifecycles directly to the underlying canvas nodes without triggering browser-level security banners or DevTools debugger sessions.
- Dynamic Keybinding Macros: Supports composite triggers mapping
Z + [Digit 1-9]+LMB. - Adaptive Polling Rate: Configured to an aggressive 75ms dispatch interval (approx. 13 operations per second) for rapid execution, while ensuring the engine has sufficient time to parse the event frames.
- Positional Variance Abort: Actively monitors Euclidean distance deltas on
mousemove. The macro immediately terminates if the cursor drifts beyond a 50px threshold, preventing accidental cross-canvas clicks. - State Management: Implements automated hardware state registry purging on window
blurto prevent phantom input locks if the user switches tabs mid-execution.
- Clone or download this repository to your local machine.
- Open Google Chrome and navigate to
chrome://extensions/. - Enable Developer mode via the toggle switch in the upper right corner.
- Click Load unpacked and select the directory containing the extension files.
- Navigate to the game environment.
- Important: Execute a Hard Reload (
Ctrl + F5) to purge the browser cache and ensure the payload is successfully injected into the fresh page context.
- Hover your cursor over the target coordinate/entity on the canvas.
- Press and hold the primary modifier key:
Z. - Press and hold any secondary numeric modifier corresponding to the desired entity index (e.g.,
1,2,3...). - Click and hold the Left Mouse Button (
LMB). - Keep the cursor stationary. The script will rapidly dispatch synthetic building sequences until any of the modifier keys are released or the cursor is moved outside the safety threshold.
- JavaScript (ES6+)
- Manifest V3
- DOM Synthetic Event Dispatching (
KeyboardEvent,MouseEvent,PointerEvent)