Skip to content

Commit 691fd9d

Browse files
committed
Merge branch 'feat/build'
2 parents 01663c7 + ef02c90 commit 691fd9d

38 files changed

+2817
-1819
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.16.0
2+
- vite更新到5.0,antd更新到5.0
3+
- 添加禁用类型,可设置禁用 xhr 或 fetch
4+
- 添加插件拦截时机,可设置start end delay trigger override
5+
16
## v1.15.0
27
- 添加run at功能
38

package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"build:local": "cross-env VITE_LOCAL=true node script.js && cross-env VITE_LOCAL=true npm run build:web && cross-env VITE_LOCAL=true npm run build:ts"
1111
},
1212
"dependencies": {
13-
"@ant-design/icons": "^4.6.3",
13+
"@ant-design/compatible": "^5.1.2",
14+
"@ant-design/icons": "^5.2.6",
1415
"@monaco-editor/react": "^4.4.6",
15-
"antd": "^4.24.4",
16+
"antd": "^5.12.1",
1617
"json-schema": "^0.3.0",
1718
"react": "^18.2.0",
1819
"react-dom": "^18.2.0"
@@ -27,19 +28,17 @@
2728
"@types/node": "^18.14.6",
2829
"@types/react": "^18.0.24",
2930
"@types/react-dom": "^18.0.8",
31+
"@vitejs/plugin-react": "^4.2.0",
3032
"cross-env": "^7.0.3",
31-
"less": "^4.1.1",
32-
"less-loader": "^10.0.1",
33+
"less": "^4.2.0",
3334
"monaco-editor": "^0.33.0",
3435
"rollup": "^2.75.6",
3536
"rollup-plugin-external-globals": "^0.6.1",
3637
"rollup-plugin-terser": "^7.0.2",
3738
"rollup-plugin-typescript2": "^0.32.1",
38-
"@vitejs/plugin-react": "^4.0.0-beta.0",
39-
"typescript": "^5.0.2",
40-
"vite": "^4.3.0",
41-
"vite-plugin-cdn-import": "^0.3.5",
42-
"vite-plugin-style-import": "^1.2.1"
39+
"typescript": "^5.3.3",
40+
"vite": "^5.0.0",
41+
"vite-plugin-cdn-import": "^0.3.5"
4342
},
44-
"license": "GPL"
43+
"license": "AGPL"
4544
}

pnpm-lock.yaml

+1,460-1,105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/_locales/en/messages.json

+24
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"action_refresh": {
2727
"message": "Refresh Data"
2828
},
29+
"action_all_frames": {
30+
"message": "All frames"
31+
},
2932
"action_theme": {
3033
"message": "Switch Theme"
3134
},
@@ -118,6 +121,24 @@
118121
"run_at_trigger": {
119122
"message": "trigger"
120123
},
124+
"run_at_override": {
125+
"message": "override"
126+
},
127+
"ban_title": {
128+
"message": "Ban Request Type"
129+
},
130+
"ban_xhr": {
131+
"message": "xhr"
132+
},
133+
"ban_fetch": {
134+
"message": "fetch"
135+
},
136+
"ban_none": {
137+
"message": "none"
138+
},
139+
"ban_all": {
140+
"message": "all"
141+
},
121142
"tip_send": {
122143
"message": "Click to fetch request"
123144
},
@@ -137,5 +158,8 @@
137158
"content": "$1"
138159
}
139160
}
161+
},
162+
"quota_percent": {
163+
"message": "Percent of quota"
140164
}
141165
}

public/_locales/zh_CN/messages.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"action_refresh": {
2727
"message": "刷新数据"
2828
},
29+
"action_all_frames": {
30+
"message": "所有frame生效"
31+
},
2932
"action_theme": {
3033
"message": "切换主题"
3134
},
@@ -116,7 +119,25 @@
116119
"message": "延时"
117120
},
118121
"run_at_trigger": {
119-
"message": "拦截"
122+
"message": "触发"
123+
},
124+
"run_at_override": {
125+
"message": "重写"
126+
},
127+
"ban_title": {
128+
"message": "设置禁用请求类型"
129+
},
130+
"ban_xhr": {
131+
"message": "xhr"
132+
},
133+
"ban_fetch": {
134+
"message": "fetch"
135+
},
136+
"ban_none": {
137+
"message": ""
138+
},
139+
"ban_all": {
140+
"message": "全部"
120141
},
121142
"tip_send": {
122143
"message": "点击发送请求"
@@ -137,5 +158,8 @@
137158
"content": "$1"
138159
}
139160
}
161+
},
162+
"quota_percent": {
163+
"message": "存储占用率"
140164
}
141165
}

public/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Easy Interceptor",
4-
"version": "1.15.1",
4+
"version": "1.16.0",
55
"description": "__MSG_description__",
66
"permissions": [
77
"storage",
@@ -20,7 +20,7 @@
2020
"default_locale": "zh_CN",
2121
"content_security_policy" : "script-src 'self' 'unsafe-eval'; script-src-elem 'self' data: blob: https://unpkg.com; worker-src 'self' data: blob:; object-src 'self'",
2222
"browser_action": {
23-
"default_title": "Easy Interceptor by hans000",
23+
"default_title": "Easy Interceptor by hans000 - v1.16.0",
2424
"default_popup": "index.html",
2525
"default_icon": "images/48-gray.png"
2626
},

readme-zh_CN.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
>
3232
> 如果你是一个熟练度拉满,有着完善的代理环境大可不必使用,仅作为特定场合的补充
3333
>
34-
> 如果使用cdn版本,请保证能访问https://unpkg.com,首次加载会比较慢。或者直接使用local版本
34+
> 如果使用cdn版本,请保证能访问https://unpkg.com,首次加载会比较慢。如果加载不出来也可直接使用local版本
3535
3636
## 🎉 特点
3737

@@ -69,7 +69,9 @@
6969
## 状态栏
7070
- 【设置】:设置选项
7171
- 【工作空间】:切换工作空间
72-
- 【运行时机】:插件生效的时机,start-js注入即生效,end-DOMContentLoaded,delay-延时一定时间,trigger-当拦截到特定接口后触发
72+
- 【运行时机】:插件生效的时机,start-js注入即生效,end-DOMContentLoaded,delay-延时一定时间,trigger-当拦截到特定接口后触发,override-当window上的xhr或者fetch被重写时
73+
- 【禁用类型】:禁用请求类型:xhr 或者 fetch
74+
- 【存储占用率】:展示数据占用率
7375

7476
### config面板
7577

@@ -78,6 +80,7 @@
7880
|url|string|请求地址|
7981
|test|string|必选,匹配的请求地址,ant-path-matcher规则或字符串匹配,不允许写query参数|
8082
|type|xhr\|fetch|请求类型|
83+
|description|string|描述字段,做备注使用|
8184
|response|object\|array\|null\boolean\|number|响应数据|
8285
|responseText|string|响应数据|
8386
|delay|number|延迟的毫秒数|

readme.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ How to solve the above problems? If you can intercept and modify the data before
7272
## Status Bar
7373
- \[Setting\]: Setting
7474
- [Work Space]: Switch work space
75-
- [Run At]:four options can be choose. start (js injected will be work),end (DOMContentLoaded),delay (delay some times),trigger (match a url)
75+
- [Run At]: four options can be choose. start (js injected will be work),end (DOMContentLoaded),delay (delay some times),trigger (match a url),override (window.XMLHttpRequest or window.fetch was override)
76+
- \[Ban Type\]: Ban type, xhr or fetch
77+
- \[Quota\]: Percent of quota
7678

7779

7880
### Config Panel
@@ -82,6 +84,7 @@ How to solve the above problems? If you can intercept and modify the data before
8284
|url|string|request url|
8385
|test|string|required, match request url, ant-path-matcher rule or string match, cannot set query|
8486
|type|xhr\|fetch|request type|
87+
|description|string|note|
8588
|response|object\|array\|null\boolean\|number||
8689
|responseText|string||
8790
|delay|number||

script.js

-17
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,6 @@ if (! import.meta.env.DEV) {
1616
loadLocalMocano()
1717
}`,
1818
},
19-
{
20-
filename: './src/App.tsx',
21-
mark: 'injectDarkStyle',
22-
code: `
23-
const link = document.createElement('link')
24-
link.setAttribute('dark', '')
25-
link.href = 'https://unpkg.com/[email protected]/dist/antd.dark.css'
26-
link.rel = 'stylesheet'
27-
document.head.appendChild(link)`
28-
},
29-
{
30-
filename: './src/dark.less',
31-
mark: 'darkLess',
32-
isLocal: true,
33-
code: `
34-
@import 'antd/dist/antd.dark.less';`
35-
}
3619
]
3720

3821
configList.forEach(config => {

src/App.less

+12-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616

1717
@width: 300px;
18-
@topHeight: 46px;
18+
@topHeight: 40px;
1919
@GWidth: 800px;
2020
@GHeight: 600px;
2121

@@ -31,11 +31,11 @@
3131
transition: none;
3232
}
3333

34-
&__quote {
34+
&__quota {
3535
position: absolute;
3636
width: 100%;
3737
z-index: 2;
38-
top: 43px;
38+
top: @topHeight - 2px;
3939
line-height: 0;
4040
}
4141
&__editor {
@@ -75,7 +75,6 @@
7575
display: flex;
7676
justify-content: space-between;
7777
align-items: center;
78-
padding-left: 8px;
7978
background-color: #eee;
8079
box-shadow: #ccc 1px 1px 4px;
8180
&.active {
@@ -99,14 +98,22 @@
9998
padding: 0 4px;
10099
background-color: #007acc;
101100
color: white;
102-
cursor: pointer;
103101
&-item {
104102
padding: 0 4px;
105103
&:hover {
106104
background-color: #1f89d1;
105+
cursor: pointer;
107106
}
108107
}
109108
}
109+
&__upload button {
110+
border-radius: 0;
111+
}
112+
}
113+
114+
.workspace .ant-select-selector {
115+
padding-left: 4px!important;
116+
padding-right: 0!important;
110117
}
111118

112119
.nav__item {

0 commit comments

Comments
 (0)