/** * 获取指定 URL 下某个 Cookie 的值。 * * 注意: * - 依赖 chrome.cookies API,只能在浏览器扩展的后台上下文中调用 * (如 MV3 service worker、background page、extension page 等)。 * - 不能在普通网页环境或仅有 content-script 的上下文中直接使用。 */ export declare function getCookie(url: string, name: string, onlyValue: true): Promise; export declare function getCookie(url: string, name: string, onlyValue?: false): Promise; /** * 获取指定 URL 下的所有 Cookie,并以 "key=value; key2=value2" 的形式返回。 * * 同样依赖 chrome.cookies API,只能在扩展后台(service worker / background 等) * 或具有相应权限的扩展页面中调用。 */ export declare function getCookies(url: string, stringified: true): Promise; export declare function getCookies(url: string, stringified?: false): Promise; /** * 获取当前扩展的基础信息:语言、ID、版本等。 * 需要在扩展上下文中运行(具有 chrome.runtime / chrome.i18n 的环境)。 */ export declare function getExtensionInfo(): { locale: string; extId: string; version: any; };