29 lines
723 B
TypeScript
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>;
|
|
};
|