Commit fabd2e9
♻️ 重构
* 重构 `GM_xmlhttpRequest` 及相关代码
* 刪無用代碼
* mock修正
* 重构 `GM_donwload`
* GM_download: 跟随TM,改使用 fetch
* `GM_download` 代码修正
* `GM_download` 代码调整
* `GM_xmlhttpRequest` 修正 `context`;`GM_download` 新增 `context`, `user`, `password`
* 代码调整,避免参考无法GC回收
* 支持 `binary: true`
* 添加单元测试
* 定义成常量赋予含义
* 不用可以直接删
* 没地方引用dealXhrResponse了,可以直接删
* 修正response空值问题
* 新增 GM xhr API 黑名单判断 (与TM一致)
* 单元测试更改成 concurrent
* 单元测试代码调整
* FF兼容调整
* FF兼容调整
* 代码清理一下
* 整理单元测试mock
* 整理代码结构
* 删除byPass逻辑,避免饶过的可能
* 通过单元测试
* 改善了reqID关联的代码设计
* typescript 要 return undefined
* 修正 lastNwReqTriggerTime
* 修正
* 中文注释
中文注释
* 删旧代码
* 抽出成 generateUniqueMarkerID
* 中文注释
* 修正错误处理
* 异常处理: nwReqExecute 过时处理
* 时间值条件修改
* 勉强无幸福,只好退回
* 整理结构
* 测试脚本
* 整理
* 整理定义
* 整理fetch xhr
* 整理
* 删除不使用的方法
---------
Co-authored-by: 王一之 <[email protected]>GM_xmlhttpRequest 及相关代码 (#901)1 parent 7b14f35 commit fabd2e9
File tree
36 files changed
+5033
-1083
lines changed- example/tests
- packages/chrome-extension-mock
- src
- app/service
- content
- gm_api
- offscreen
- service_worker
- gm_api
- locales
- pkg/utils
- xhr
- template
- types
- tests
- mocks
- runtime
36 files changed
+5033
-1083
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 6 | | |
36 | 7 | | |
37 | 8 | | |
| |||
49 | 20 | | |
50 | 21 | | |
51 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
52 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments