π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
import { OBSERVER_PORT_NAME } from './constants';
import { openPort } from './open-port';
import type { PanelVoiceUpdate } from './types';
export function observeVoiceFromBackground(
onVoiceUpdate: (update: PanelVoiceUpdate) => void,
onConnect?: () => void,
): () => void {
return openPort(
OBSERVER_PORT_NAME,
(msg) => {
if (msg.type === 'VOICE_UPDATE') onVoiceUpdate(msg);
},
onConnect,
);
}