Files
redux-scraper/user_scripts/userscript_api.ts
2025-02-25 00:21:49 +00:00

29 lines
723 B
TypeScript

declare const unsafeWindow: Window &
typeof globalThis & {
submission_data: Record<string, any>;
};
interface GMResponse {
readyState: number;
responseHeaders: string;
responseText: string;
status: number;
statusText: string;
}
declare const GM_xmlhttpRequest: (details: {
url: string;
method: string;
headers?: Record<string, string>;
data?: string;
onload: (response: GMResponse) => void;
onabort: (response: GMResponse) => void;
ontimeout: (response: GMResponse) => void;
onerror: (response: GMResponse) => void;
}) => void;
declare const GM: {
getValue: (key: string, defaultValue?: string) => Promise<string | null>;
setValue: (key: string, value: string) => Promise<void>;
};