Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

期待加一个DisableShortcut的选项 #97

Open
qwIvan opened this issue Jun 6, 2024 · 1 comment
Open

期待加一个DisableShortcut的选项 #97

qwIvan opened this issue Jun 6, 2024 · 1 comment

Comments

@qwIvan
Copy link

qwIvan commented Jun 6, 2024

我希望在检测到开发者工具被打开后,自己设下圈套做些处理,例如给一些假接口假数据之类的。我不想直接禁止人打开控制台,这样别人就会想方设法绕过。我不想让人知道我有做防御措施,以免打草惊蛇。

@theajack
Copy link
Owner

theajack commented Jun 9, 2024

现在可以的啊

DisableDevtool({
    ondevtoolopen(type, next){
        alert('Devtool opened with type:' + type);
        next(); // 这个next如果不调用就没有默认行为
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants