mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-14 22:54:32 +08:00
新增网络请求拦截功能:在浏览器命令中添加请求和响应拦截选项,支持自定义拦截规则和内容替换
This commit is contained in:
@@ -9,8 +9,13 @@ const initCDP = async (targetId) => {
|
||||
port,
|
||||
});
|
||||
|
||||
const { Page, Runtime, Target, Network, Emulation, DOM } = client;
|
||||
await Promise.all([Page.enable(), Runtime.enable(), DOM.enable()]);
|
||||
const { Page, Runtime, Target, Network, Emulation, DOM, Fetch } = client;
|
||||
await Promise.all([
|
||||
Page.enable(),
|
||||
Runtime.enable(),
|
||||
DOM.enable(),
|
||||
Fetch.enable(),
|
||||
]);
|
||||
|
||||
return {
|
||||
client,
|
||||
@@ -20,6 +25,7 @@ const initCDP = async (targetId) => {
|
||||
Network,
|
||||
Emulation,
|
||||
DOM,
|
||||
Fetch,
|
||||
};
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
||||
Reference in New Issue
Block a user