(runAts: string[])
| 22 | import { cacheInstance } from "@App/app/cache"; |
| 23 | |
| 24 | export function getRunAt(runAts: string[]): chrome.extensionTypes.RunAt { |
| 25 | // 没有 run-at 时为 undefined. Fallback 至 document_idle |
| 26 | const runAt = runAts[0] as string | undefined; |
| 27 | if (runAt === "document-start") { |
| 28 | return "document_start"; |
| 29 | } else if (runAt === "document-end") { |
| 30 | return "document_end"; |
| 31 | } |
| 32 | return "document_idle"; |
| 33 | } |
| 34 | |
| 35 | // 检查是不是base64编码 |
| 36 | export function isBase64(str: string): boolean { |
no outgoing calls
no test coverage detected