chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪

This commit is contained in:
2026-08-08 17:38:08 +08:00
parent 202ab537d1
commit 0bb552b026
1004 changed files with 115066 additions and 20081 deletions
+44
View File
@@ -0,0 +1,44 @@
import type {RequestListener} from 'http';
import type {WaitForOptions} from 'puppeteer-core';
import type {ColorScheme, ExtensionData, News, UserSettings} from '../../src/definitions';
type PathsObject = {[path: string]: string | RequestListener | PathsObject};
type OneStyleExpectation = [selector: string | string[], cssAttributeName: string, expectedValue: string];
type StyleExpectations = OneStyleExpectation[] | OneStyleExpectation;
declare global {
const loadTestPage: (paths: PathsObject & {cors?: PathsObject}, gotoOptions?: WaitForOptions) => Promise<void>;
const corsURL: string;
const popupUtils: {
click: (selector: string) => Promise<void>;
exists: (selector: string) => Promise<void>;
saveFile: (name: string, content: string) => Promise<void>;
};
const devtoolsUtils: {
click: (selector: string) => Promise<void>;
exists: (selector: string) => Promise<void>;
paste: (fixes: string) => Promise<void>;
reset: () => Promise<void>;
};
const backgroundUtils: {
changeSettings: (settings: Partial<UserSettings>) => Promise<void>;
collectData: () => Promise<ExtensionData>;
changeChromeStorage: (region: 'local' | 'sync', data: {[key: string]: any}) => Promise<void>;
getColorScheme: () => Promise<ColorScheme>;
getChromeStorage: (region: 'local' | 'sync', keys: string[]) => Promise<{[key: string]: any}>;
getManifest: () => Promise<chrome.runtime.Manifest>;
setNews: (news: News[] | null) => Promise<void>;
onDownload: (callback: (p: {ok: boolean}) => void) => void;
emulateColorScheme: (colorScheme: ColorScheme) => Promise<void>;
};
const pageUtils: {
evaluateScript: (script: () => any) => Promise<any>;
};
const emulateColorScheme: (value: ColorScheme) => Promise<void>;
const awaitForEvent: (uuid: string) => Promise<void>;
const expectPageStyles: (expect: jest.Expect, expectations: StyleExpectations) => Promise<void>;
const getColorScheme: () => Promise<ColorScheme>;
const product: 'firefox';
}