You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.2 KiB
149 lines
4.2 KiB
declare module '*.css' {
|
|
export default string;
|
|
}
|
|
|
|
declare module '*.png' {
|
|
export default new Uint8Array;
|
|
}
|
|
|
|
declare module 'f5stegojs' {
|
|
export default class f5 {
|
|
constructor(private seed: ArrayLike<number>);
|
|
|
|
embed(jpegdata: Uint8Array, data: Uint8Array): Uint8Array;
|
|
|
|
extract(jpegdata: Uint8Array): Uint8Array | null;
|
|
}
|
|
}
|
|
|
|
declare module 'mp4box' {
|
|
type BaseTrackInfo = {
|
|
id: number,
|
|
created: string,
|
|
modified: string,
|
|
movie_duration: number,
|
|
layer: number,
|
|
alternate_group: number,
|
|
volume: number,
|
|
track_width: number,
|
|
track_height: number,
|
|
timescale: number,
|
|
duration: number,
|
|
bitrate: number,
|
|
codec: string,
|
|
language: string,
|
|
nb_samples: number
|
|
};
|
|
|
|
type VideoTrackInfo = BaseTrackInfo & {
|
|
type: 'video';
|
|
movie_duration: number;
|
|
video: {
|
|
width: number,
|
|
height: number
|
|
},
|
|
};
|
|
|
|
type AudioTrackInfo = BaseTrackInfo & {
|
|
type: 'audio';
|
|
audio: {
|
|
sample_rate: number,
|
|
channel_count: number,
|
|
sample_size: number
|
|
},
|
|
};
|
|
|
|
type InfoType = {
|
|
duration: number,
|
|
fragment_duration: number;
|
|
timescale: number,
|
|
isFragmented: boolean,
|
|
isProgressive: boolean,
|
|
hasIOD: boolean,
|
|
brands: string[],
|
|
created: string,
|
|
modified: string,
|
|
mime?: string;
|
|
tracks: (VideoTrackInfo | AudioTrackInfo)[]
|
|
};
|
|
|
|
export function createFile(): {
|
|
onError(e: Error): void;
|
|
onReady(info: InfoType): void;
|
|
appendBuffer(a: ArrayBuffer, end?: boolean): void;
|
|
start(): void;
|
|
seek(time: number, useRap: boolean): {offset: number};
|
|
stop(): void;
|
|
flush(): void;
|
|
setSegmentOptions(id: number, user?: any, options?: {
|
|
nbSamples?: number;
|
|
rapAlignement?: boolean;
|
|
}): void;
|
|
unsetSegmentOptions(id: number): void;
|
|
onSegment(id: number, user: any, buffer: ArrayBuffer, sampleNumber: number, last: boolean): void;
|
|
initializeSegmentation(): {
|
|
id: number;
|
|
user: any;
|
|
buffer: ArrayBuffer;
|
|
}[];
|
|
releaseUsedSamples(id: number, lsampleid: number): void;
|
|
};
|
|
}
|
|
|
|
declare module 'blockhash' {
|
|
export const hammingDistance: (a: string, b: string) => number;
|
|
export const blockhash: () => void;
|
|
export const blockhashData: (imgData: {
|
|
width: number,
|
|
height: number,
|
|
data: Uint8Array
|
|
}, bits: number, method: number) => string;
|
|
}
|
|
|
|
declare module "jpeg-js/lib/decoder" {
|
|
export interface RawImageData<T> {
|
|
width: number;
|
|
height: number;
|
|
data: T;
|
|
}
|
|
|
|
type BufferRet = RawImageData<Buffer>;
|
|
type UintArrRet = RawImageData<Uint8Array>;
|
|
|
|
type ImageData = BufferRet | UintArrRet;
|
|
type BufferLike = Buffer | Uint8Array | ArrayLike<number> | Iterable<number> | ArrayBuffer;
|
|
|
|
export declare function decode(
|
|
jpegData: BufferLike,
|
|
opts: {
|
|
useTArray: true;
|
|
colorTransform?: boolean;
|
|
formatAsRGBA?: boolean;
|
|
tolerantDecoding?: boolean;
|
|
maxResolutionInMP?: number;
|
|
maxMemoryUsageInMB?: number;
|
|
},
|
|
): UintArrRet & { comments?: string[] };
|
|
export declare function decode(
|
|
jpegData: BufferLike,
|
|
opts?: {
|
|
useTArray?: false;
|
|
colorTransform?: boolean;
|
|
formatAsRGBA?: boolean;
|
|
tolerantDecoding?: boolean;
|
|
maxResolutionInMP?: number;
|
|
maxMemoryUsageInMB?: number;
|
|
},
|
|
): BufferRet & { comments?: string[] };
|
|
|
|
}
|
|
|
|
declare const QR: any;
|
|
declare const BUILD_VERSION: [number, number];
|
|
declare const execution_mode: 'userscript' | 'chrome_api' | 'ff_api' | 'worker';
|
|
declare const isBackground: boolean;
|
|
declare const chrome: typeof browser;
|
|
declare const _DOMParser: typeof DOMParser;
|
|
declare const manifest: 2 | 3;
|
|
declare function GM_addElement(parent: HTMLElement, tagname: string, attrs: Record<string, string>);
|
|
declare function cloneInto<T>(e: T, where: Window & typeof globalThis | null): T;
|