temp
This commit is contained in:
parent
67ba515b2c
commit
d200809fee
@ -391,7 +391,7 @@ export default class GMApi {
|
|||||||
anonymous: details.anonymous,
|
anonymous: details.anonymous,
|
||||||
user: details.user,
|
user: details.user,
|
||||||
password: details.password,
|
password: details.password,
|
||||||
maxRedirects: details.maxRedirects,
|
redirect: details.redirect,
|
||||||
};
|
};
|
||||||
if (!param.headers) {
|
if (!param.headers) {
|
||||||
param.headers = {};
|
param.headers = {};
|
||||||
|
@ -33,7 +33,6 @@ const ScriptResource: React.FC<{
|
|||||||
}> = ({ script, visible, onCancel, onOk }) => {
|
}> = ({ script, visible, onCancel, onOk }) => {
|
||||||
const [data, setData] = useState<ResourceListItem[]>([]);
|
const [data, setData] = useState<ResourceListItem[]>([]);
|
||||||
const inputRef = useRef<RefInputType>(null);
|
const inputRef = useRef<RefInputType>(null);
|
||||||
// const resourceCtrl = IoC.instance(ResourceController) as ResourceController;
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -139,21 +139,6 @@ declare function GM_cookie(
|
|||||||
ondone: (cookie: GMTypes.Cookie[], error: unknown | undefined) => void
|
ondone: (cookie: GMTypes.Cookie[], error: unknown | undefined) => void
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
/**
|
|
||||||
* 可以通过GM_addValueChangeListener获取tabid
|
|
||||||
* 再通过tabid(前后端通信可能用到,ValueChangeListener会返回tabid),获取storeid,后台脚本用.
|
|
||||||
* 请注意这是一个实验性质的API,后续可能会改变
|
|
||||||
* @param tabid 页面的tabid
|
|
||||||
* @param ondone 完成事件
|
|
||||||
* @param callback.storeid 该页面的storeid,可以给GM_cookie使用
|
|
||||||
* @param callback.error 错误信息
|
|
||||||
* @deprecated 已废弃,请使用GM_cookie("store", tabid)替代
|
|
||||||
*/
|
|
||||||
declare function GM_getCookieStore(
|
|
||||||
tabid: number,
|
|
||||||
ondone: (storeId: number | undefined, error: unknown | undefined) => void
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置浏览器代理
|
* 设置浏览器代理
|
||||||
* @deprecated 正式版中已废弃,后续可能会在beta版本中添加
|
* @deprecated 正式版中已废弃,后续可能会在beta版本中添加
|
||||||
@ -289,10 +274,7 @@ declare namespace CATType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare namespace GMTypes {
|
declare namespace GMTypes {
|
||||||
/*
|
type CookieAction = "list" | "delete" | "set";
|
||||||
* store为获取隐身窗口之类的cookie,这是一个实验性质的API,后续可能会改变
|
|
||||||
*/
|
|
||||||
type CookieAction = "list" | "delete" | "set" | "store";
|
|
||||||
|
|
||||||
type LoggerLevel = "debug" | "info" | "warn" | "error";
|
type LoggerLevel = "debug" | "info" | "warn" | "error";
|
||||||
|
|
||||||
@ -308,17 +290,13 @@ declare namespace GMTypes {
|
|||||||
path?: string;
|
path?: string;
|
||||||
secure?: boolean;
|
secure?: boolean;
|
||||||
session?: boolean;
|
session?: boolean;
|
||||||
storeId?: string;
|
|
||||||
httpOnly?: boolean;
|
httpOnly?: boolean;
|
||||||
expirationDate?: number;
|
expirationDate?: number;
|
||||||
// store用
|
|
||||||
tabId?: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Cookie {
|
interface Cookie {
|
||||||
domain: string;
|
domain: string;
|
||||||
name: string;
|
name: string;
|
||||||
storeId: string;
|
|
||||||
value: string;
|
value: string;
|
||||||
session: boolean;
|
session: boolean;
|
||||||
hostOnly: boolean;
|
hostOnly: boolean;
|
||||||
@ -341,7 +319,7 @@ declare namespace GMTypes {
|
|||||||
active?: boolean;
|
active?: boolean;
|
||||||
insert?: boolean;
|
insert?: boolean;
|
||||||
setParent?: boolean;
|
setParent?: boolean;
|
||||||
useOpen?: boolean; // 这是一个实验性/不兼容其他管理器/不兼容Firefox的功能
|
useOpen?: boolean; // 这是一个实验性/不兼容其他管理器/不兼容Firefox的功能 表示使用window.open打开新窗口 #178
|
||||||
}
|
}
|
||||||
|
|
||||||
interface XHRResponse {
|
interface XHRResponse {
|
||||||
@ -384,7 +362,7 @@ declare namespace GMTypes {
|
|||||||
user?: string;
|
user?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
nocache?: boolean;
|
nocache?: boolean;
|
||||||
maxRedirects?: number;
|
redirect?: "follow" | "error" | "manual";// 为了与tm保持一致, 在v0.17.0后废弃maxRedirects, 使用redirect替代, 会强制使用fetch模式
|
||||||
|
|
||||||
onload?: Listener<XHRResponse>;
|
onload?: Listener<XHRResponse>;
|
||||||
onloadstart?: Listener<XHRResponse>;
|
onloadstart?: Listener<XHRResponse>;
|
||||||
|
1
src/types/main.d.ts
vendored
1
src/types/main.d.ts
vendored
@ -31,7 +31,6 @@ declare namespace GMSend {
|
|||||||
nocache?: boolean;
|
nocache?: boolean;
|
||||||
dataType?: "FormData" | "Blob";
|
dataType?: "FormData" | "Blob";
|
||||||
redirect?: "follow" | "error" | "manual";
|
redirect?: "follow" | "error" | "manual";
|
||||||
maxRedirects?: number; // 为了与tm保持一致, 在v0.17.0后废弃, 使用redirect替代
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface XHRFormData {
|
interface XHRFormData {
|
||||||
|
2
src/types/scriptcat.d.ts
vendored
2
src/types/scriptcat.d.ts
vendored
@ -362,7 +362,7 @@ declare namespace GMTypes {
|
|||||||
user?: string;
|
user?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
nocache?: boolean;
|
nocache?: boolean;
|
||||||
maxRedirects?: number;
|
redirect?: "follow" | "error" | "manual";// 为了与tm保持一致, 在v0.17.0后废弃maxRedirects, 使用redirect替代, 会强制使用fetch模式
|
||||||
|
|
||||||
onload?: Listener<XHRResponse>;
|
onload?: Listener<XHRResponse>;
|
||||||
onloadstart?: Listener<XHRResponse>;
|
onloadstart?: Listener<XHRResponse>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user