Midora/extension/definitions.d.ts

47 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-06-29 15:16:27 +02:00
declare class BloomFilter {
constructor(data: Uint32Array, k: number);
test(key: string): boolean;
name: LabelKind;
}
interface HTMLElement {
assignedCssLabel?: string
}
interface LabelToSolve {
element: HTMLAnchorElement
identifier: string
2019-06-29 15:16:27 +02:00
}
type LabelKind = 't-friendly' | 'transphobic' | 'none' | '' | 'bad-identifier';
interface ShinigamiEyesSubmission {
mark?: LabelKind
url?: string
tabId?: number
frameId?: number
debug?: number
2019-06-29 15:41:37 +02:00
identifier?: string
secondaryIdentifier?: string
version?: number
submissionId?: string
contextPage?: string
linkId?: number
snippet?: string
2019-10-06 14:29:26 +02:00
isSocialNetwork?: boolean
}
interface ShinigamiEyesCommand {
acceptClicked?: boolean
myself?: string
ids?: string[]
updateAllLabels?: boolean
2019-07-17 23:35:00 +02:00
closeCallingTab?: boolean
setTheme?: string
2019-10-06 14:29:26 +02:00
confirmSetIdentifier?: string
confirmSetLabel?: LabelKind
confirmSetUrl?: string
badIdentifierReason?: BadIdentifierReason
}
2019-06-29 19:54:25 +02:00
type LabelMap = { [identifier: string]: LabelKind };
2019-06-29 19:54:25 +02:00
interface ShinigamiEyesMessage extends ShinigamiEyesSubmission, ShinigamiEyesCommand {
2019-06-29 15:41:37 +02:00
}
type ContextMenuCommand = 'mark-t-friendly' | 'mark-transphobic' | 'mark-none' | 'help' | 'options' | 'separator';
type BadIdentifierReason = 'SN' | 'AR';