File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55// @description 可以控制浏览器的cookie, 必须指定@connect, 并且每次一个新的域调用都需要用户确定
66// @author You
77// @match https://bbs.tampermonkey.net.cn/
8- // @grant GM_cookie
9- // @connect example.com
8+ // @grant GM_cookie
9+ // @connect example.com
1010// ==/UserScript==
1111
1212GM_cookie ( "set" , {
Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ declare const GM_info: {
7575 [key: string]: unknown;
7676};
7777
78-
79-
8078declare function GM_listValues(): string[];
8179
8280declare function GM_addValueChangeListener(name: string, listener: GMTypes.ValueChangeListener): number;
@@ -90,7 +88,9 @@ declare function GM_setValues(values: { [key: string]: any }): void;
9088declare function GM_getValue(name: string, defaultValue?: any): any;
9189
9290// 获取多个值, 如果keysOrDefaults是一个对象, 则使用对象的值作为默认值
93- declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): { [key: string]: any } ;
91+ declare function GM_getValues(keysOrDefaults: { [key: string]: any } | string[] | null | undefined): {
92+ [key: string]: any;
93+ } ;
9494
9595declare function GM_deleteValue(name: string): void;
9696
@@ -353,6 +353,7 @@ declare namespace GMTypes {
353353 path: string;
354354 httpOnly: boolean;
355355 secure: boolean;
356+ sameSite: " unspecified" | " no_restriction" | " lax" | " strict" ;
356357 }
357358
358359 // tabid是只有后台脚本监听才有的参数
Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ declare const GM_info: {
7575 [ key : string ] : unknown ;
7676} ;
7777
78-
79-
8078declare function GM_listValues ( ) : string [ ] ;
8179
8280declare function GM_addValueChangeListener ( name : string , listener : GMTypes . ValueChangeListener ) : number ;
@@ -90,7 +88,9 @@ declare function GM_setValues(values: { [key: string]: any }): void;
9088declare function GM_getValue ( name : string , defaultValue ?: any ) : any ;
9189
9290// 获取多个值, 如果keysOrDefaults是一个对象, 则使用对象的值作为默认值
93- declare function GM_getValues ( keysOrDefaults : { [ key : string ] : any } | string [ ] | null | undefined ) : { [ key : string ] : any } ;
91+ declare function GM_getValues ( keysOrDefaults : { [ key : string ] : any } | string [ ] | null | undefined ) : {
92+ [ key : string ] : any ;
93+ } ;
9494
9595declare function GM_deleteValue ( name : string ) : void ;
9696
@@ -353,6 +353,7 @@ declare namespace GMTypes {
353353 path : string ;
354354 httpOnly : boolean ;
355355 secure : boolean ;
356+ sameSite : "unspecified" | "no_restriction" | "lax" | "strict" ;
356357 }
357358
358359 // tabid是只有后台脚本监听才有的参数
You can’t perform that action at this time.
0 commit comments