From 9a4aec39f12d416aa7fe1e60d3985434c9c78520 Mon Sep 17 00:00:00 2001 From: tackchen Date: Fri, 24 Dec 2021 16:03:28 +0800 Subject: [PATCH] feat: 0.1.12 --- README.cn.md | 2 +- README.md | 2 +- helper/version.en.md | 7 +- helper/version.md | 8 +- index.html | 2 +- npm/README.md | 2 +- npm/disable-devtool.min.js | 2 +- npm/index.d.ts | 2 +- npm/package.json | 2 +- package-lock.json | 14154 ++++++++++++++++++++++++++++++- package.json | 2 +- public/main.js | 18 +- src/detector/date-to-string.js | 6 +- src/detector/debugger.js | 2 +- src/detector/define-id.js | 6 +- src/detector/detector.js | 9 +- src/detector/func-to-string.js | 6 +- src/detector/log-time.js | 8 +- src/detector/reg-to-string.js | 11 +- src/detector/size.js | 8 +- src/index.d.ts | 2 +- src/key-menu.js | 27 - src/main.js | 11 +- src/utils/close-window.js | 31 + src/{ => utils}/config.js | 4 +- src/{ => utils}/interval.js | 3 +- src/utils/key-menu.js | 38 + src/utils/log.js | 24 + src/{ => utils}/md5.js | 0 src/{ => utils}/util.js | 50 +- src/version.js | 2 +- 31 files changed, 14309 insertions(+), 142 deletions(-) delete mode 100644 src/key-menu.js create mode 100644 src/utils/close-window.js rename src/{ => utils}/config.js (80%) rename src/{ => utils}/interval.js (95%) create mode 100644 src/utils/key-menu.js create mode 100644 src/utils/log.js rename src/{ => utils}/md5.js (100%) rename src/{ => utils}/util.js (72%) diff --git a/README.cn.md b/README.cn.md index fc9bc9e..5a625c0 100644 --- a/README.cn.md +++ b/README.cn.md @@ -106,7 +106,7 @@ declare interface optionStatic { md5?: string; // 绕过禁用的md5值,详情见3.2,默认不启用绕过禁用 url?: string; // 关闭页面失败时的跳转页面,默认值为localhost tkName?: string; // 绕过禁用时的url参数名称,默认为 ddtk - ondevtoolopen?(type: DetectorType): void; // 开发者面板打开的回调,启用时url参数无效,type 为监测模式,详见3.5 + ondevtoolopen?(type: DetectorType, next: Function): void; // 开发者面板打开的回调,启用时url参数无效,type 为监测模式,详见3.5 interval?: number; // 定时器的时间间隔 默认200ms disableMenu?: boolean; // 是否禁用右键菜单 默认为true stopIntervalTime?: number; // 在移动端时取消监视的等待时长 diff --git a/README.md b/README.md index da7432f..e0ed6c4 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ declare interface optionStatic { md5?: string; // Bypass the disabled md5 value, see 3.2 for details, the bypass disable is not enabled by default url?: string; // Jump to the page when closing the page fails, the default value is localhost tkName?: string; // Bypass the url parameter name when disabled, the default is ddtk - ondevtoolopen?(type: DetectorType): void; // Callback for opening the developer panel, the url parameter is invalid when it is enabled, and the type is the monitoring mode, see 3.5 for details + ondevtoolopen?(type: DetectorType, next: Function): void; // Callback for opening the developer panel, the url parameter is invalid when it is enabled, and the type is the monitoring mode, see 3.5 for details interval?: number; // Timer interval is 200ms by default disableMenu?: boolean; // Whether to disable the right-click menu The default is true clearIntervalWhenDevOpenTrigger?: boolean; // Whether to stop monitoring after triggering The default is false diff --git a/helper/version.en.md b/helper/version.en.md index 45b8002..efdb3f3 100644 --- a/helper/version.en.md +++ b/helper/version.en.md @@ -73,4 +73,9 @@ 1. Fix the problem that sizeDetector is accidentally injured in browser zoom mode ## 0.1.11 -1. Fix the accidental injury caused by the third-party hack console.log method \ No newline at end of file +1. Fix the accidental injury caused by the third-party hack console.log method +## 0.1.12 +1. Add the second parameter of config.ondevtoolopen next +2. Added shortcut key operations for prohibiting reviewing elements and saving web pages +3. Refactor the code +4. Fix the problem caused by the method on the console cannot be cached by ie \ No newline at end of file diff --git a/helper/version.md b/helper/version.md index 8dcebf7..fc3a3db 100644 --- a/helper/version.md +++ b/helper/version.md @@ -73,4 +73,10 @@ 1. 修复sizeDetector在浏览器缩放模式下误伤的问题 ## 0.1.11 -1. 修复第三方 hack console.log方法 导致的误伤 \ No newline at end of file +1. 修复第三方 hack console.log方法 导致的误伤 + +## 0.1.12 +1. 增加 config.ondevtoolopen 第二个参数 next +2. 增加 禁止审查元素和保存网页的快捷键操作 +3. 重构代码 +4. 修复ie不能缓存console上的方法导致的问题 \ No newline at end of file diff --git a/index.html b/index.html index aa4d5fe..1613986 100644 --- a/index.html +++ b/index.html @@ -182,7 +182,7 @@ declare type DETECTOR_TYPE = -1 | 0 | 1 | 2 | 3;