1
0 Comments

The most protected comment box

Reddit's comment box appears as a simple white rectangle. Under the surface, it is one of the most aggressively protected input fields on the internet

At Karma Builder, we spent weeks trying to automate interactions with this UI. Standard tools failed because Reddit wraps the editor in a Shadow DOM, a locked room inside the webpage. Inside that another locked room containing the Lexical framework, which ignores any input that does not look like a real keyboard event.

We stopped fighting the code and started bypassing it entirely.

Teaching a Computer to See

Since we could not reliably find the box by reading HTML, we trained an object detection model on thousands of Reddit data.

Instead of searching for a div or a text area, our extension takes a silent screenshot and identifies the pixel coordinates of the "Comment" box. We do not care about the Shadow DOM or framework gymnastics anymore. We just find the box at position X, Y on the screen, exactly like a human eye does

A Physics Engine for Mouse Movement

Knowing where the box is only solves half the problem. Modern websites track how a mouse moves. A cursor that teleports or moves in a perfectly straight line is flagged instantly.

We built a physics engine to replicate human hand movement:

  • Non-Linear Paths: We use multi-segment Bezier curves. Each path includes slight wobbles and intentional overshoots that require a snap-back correction.

  • Fitts' Law: Humans move faster toward large targets and slower toward small ones. Our cursor accelerates sharply at the start and decelerates gradually at the end to match arm muscle mechanics.

  • Micro-Noise: A cursor that stays perfectly still for 30 seconds while typing is a bot signal. Our system produces 1-5 pixel movements every few hundred milliseconds to simulate a hand resting on a mouse.

Typing with Personality

Even typing has patterns. A human types "the" faster than "xq" because the fingers are already in position. Switching keyboard rows or using the same hand for consecutive keys adds specific timing overhead.

Our typing simulator models the entire QWERTY layout. It knows the delay required to reach for the Shift key and the fatigue that slows a person down toward the end of a long message. We even programmed a 3% type rate where the system hits. an adjacent key, pauses to "notice" the mistake, and backspaces to fix it.

The Invisible Layer

The most powerful part of this system is its invisibility.

We do not inject code into Reddit's page or modify the DOM. The extension communicates through a low-level debugging protocol that operates below the JavaScript Layer. Every mouse and keyboard event we dispatch is flagged as "trusted" by the browser, making it identical to hardware input.

The result is an automation system that does not need to hide from detection because it leaves nothing on the page to find.

Check out Karma Builder to see how we are changing Reddit automation.

posted toAvatar for product Karma Builder
Karma Builder