MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / getCookies

Function getCookies

packages/cloudscript/cloudscript.ts:24–35  ·  view source on GitHub ↗
(detail: chrome.cookies.GetAllDetails)

Source from the content-addressed store, hash-verified

22}
23
24function getCookies(detail: chrome.cookies.GetAllDetails): Promise<chrome.cookies.Cookie[]> {
25 return new Promise((resolve) => {
26 chrome.cookies.getAll(detail, (cookies) => {
27 const lastError = chrome.runtime.lastError;
28 if (lastError) {
29 console.error("chrome.runtime.lastError in chrome.cookies.getAll:", lastError);
30 // 无视错误继续执行
31 }
32 resolve(cookies);
33 });
34 });
35}
36
37// 解析导出cookie表达式生成导出的cookie
38export function parseExportCookie(exportCookie: string): Promise<ExportCookies[]> {

Callers 1

parseExportCookieFunction · 0.85

Calls 2

errorMethod · 0.80
getAllMethod · 0.45

Tested by

no test coverage detected