- TypeScript + Vite (vite-plugin-monkey) userscript - Groq API integration with whisper-large-v3 - Tap-to-toggle recording with noise suppression - Contenteditable text insertion for OpenCode web - Ctrl+Space keyboard shortcut (desktop) - Custom Whisper prompt for software development context - Recording timer, toast notifications, auto-submit option - 44 unit tests, 100% line coverage - Biome linter, Knip, Vitest, CI/CD pipeline - Bilingual README (EN/RU) with compatibility table
25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
const mockStore: Record<string, unknown> = {};
|
|
|
|
export const GM_getValue = (key: string, defaultValue: unknown): unknown => {
|
|
return key in mockStore ? mockStore[key] : defaultValue;
|
|
};
|
|
|
|
export const GM_setValue = (key: string, value: unknown): void => {
|
|
mockStore[key] = value;
|
|
};
|
|
|
|
export const GM_registerMenuCommand = (_name: string, _fn: () => void): void => {};
|
|
|
|
export const GM_xmlhttpRequest = (_details: unknown): void => {};
|
|
|
|
export const unsafeWindow = globalThis;
|
|
|
|
export const monkeyWindow = globalThis;
|
|
|
|
export const GM_addElement = (): void => {};
|
|
|
|
export const __resetMockStore = (): void => {
|
|
for (const key of Object.keys(mockStore)) {
|
|
delete mockStore[key];
|
|
}
|
|
};
|