@whitesev/utils 2.5.9 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.amd.js +3508 -3507
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +3508 -3507
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3508 -3507
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +3508 -3507
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +3508 -3507
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +3508 -3507
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +2 -1
- package/package.json +1 -1
- package/src/Utils.ts +3 -2
|
@@ -57,10 +57,11 @@ declare class Utils {
|
|
|
57
57
|
* + 来源:https://bbs.tampermonkey.net.cn/thread-3284-1-1.html
|
|
58
58
|
* + 作者:cxxjackie
|
|
59
59
|
* + 版本:1.4.3
|
|
60
|
+
* + 旧版本:1.2.4
|
|
60
61
|
* + 文档:https://scriptcat.org/zh-CN/script-show-page/637/
|
|
61
62
|
* @param useOldVersion 是否使用旧版本,默认false
|
|
62
63
|
*/
|
|
63
|
-
ajaxHooker: () => UtilsAjaxHookResult;
|
|
64
|
+
ajaxHooker: (useOldVersion?: boolean) => UtilsAjaxHookResult;
|
|
64
65
|
/**
|
|
65
66
|
* 根据坐标点击canvas元素的内部位置
|
|
66
67
|
* @param canvasElement 画布元素
|
package/package.json
CHANGED
package/src/Utils.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ColorConversion } from "./ColorConversion";
|
|
|
2
2
|
import { GBKEncoder } from "./GBKEncoder";
|
|
3
3
|
import { UtilsGMCookie } from "./UtilsGMCookie";
|
|
4
4
|
import { AjaxHooker } from "./ajaxHooker/ajaxHooker.js";
|
|
5
|
+
import { AjaxHooker1_2_4 } from "./ajaxHooker/ajaxHooker1.2.4";
|
|
5
6
|
import { GMMenu } from "./UtilsGMMenu";
|
|
6
7
|
import { Hooks } from "./Hooks";
|
|
7
8
|
import { Httpx } from "./Httpx";
|
|
@@ -23,7 +24,6 @@ import {
|
|
|
23
24
|
} from "./types/global";
|
|
24
25
|
import type { WindowApiOption } from "./types/WindowApi";
|
|
25
26
|
import { ModuleRaid } from "./ModuleRaid";
|
|
26
|
-
import { AjaxHooker1_2_4 } from "./ajaxHooker/ajaxHooker1.2.4";
|
|
27
27
|
|
|
28
28
|
class Utils {
|
|
29
29
|
private windowApi: typeof WindowApi.prototype;
|
|
@@ -210,10 +210,11 @@ class Utils {
|
|
|
210
210
|
* + 来源:https://bbs.tampermonkey.net.cn/thread-3284-1-1.html
|
|
211
211
|
* + 作者:cxxjackie
|
|
212
212
|
* + 版本:1.4.3
|
|
213
|
+
* + 旧版本:1.2.4
|
|
213
214
|
* + 文档:https://scriptcat.org/zh-CN/script-show-page/637/
|
|
214
215
|
* @param useOldVersion 是否使用旧版本,默认false
|
|
215
216
|
*/
|
|
216
|
-
ajaxHooker
|
|
217
|
+
ajaxHooker = (useOldVersion: boolean = false): UtilsAjaxHookResult => {
|
|
217
218
|
if (useOldVersion) {
|
|
218
219
|
return AjaxHooker1_2_4();
|
|
219
220
|
} else {
|