Skip to content

Instantly share code, notes, and snippets.

@samzeng
Created March 24, 2018 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samzeng/192dbf21dd3685df745e89d778cf68d9 to your computer and use it in GitHub Desktop.
Save samzeng/192dbf21dd3685df745e89d778cf68d9 to your computer and use it in GitHub Desktop.
检查用户是否打开开发者工具,并且记录打开次数
(function () {
var re = /x/;
var i = 0;
console.log(re);
re.toString = function () {
return alert('第 ' + (++i) + ' 次打开控制台');
};
})();
@samzeng
Copy link
Author

samzeng commented Mar 24, 2018

iga2kq5

@samzeng
Copy link
Author

samzeng commented Mar 24, 2018

还有一种方案是无限 debugger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment