Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

473 B
Raw Blame
import { reducedMotion } from "@/components/MenuMotion";

/** Subtle tactile pulse on supported touch devices (silent no-op on desktop or under reduced motion). */
export function tapHaptic(durationMs = 6): void {
  if (reducedMotion()) return;
  if (typeof navigator === "undefined" || typeof navigator.vibrate !== "function") return;
  try {
    navigator.vibrate(durationMs);
  } catch {
    // Ignore browsers that block vibration outside trusted touch gestures.
  }
}