chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// Loaded with HTML/DOM only
|
||||
|
||||
export function multiline(...lines: string[]): string {
|
||||
if (lines.length < 1) {
|
||||
return '\n';
|
||||
}
|
||||
if (lines[lines.length - 1] !== '') {
|
||||
lines.push('');
|
||||
}
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
export function timeout(delay: number): Promise<void> {
|
||||
return new Promise<void>((resolve) => setTimeout(resolve, delay));
|
||||
}
|
||||
|
||||
export function waitForEvent(eventName: string): Promise<void> {
|
||||
return new Promise<void>((resolve) => {
|
||||
document.addEventListener(eventName, () => resolve(), {once: true});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user