Created
March 24, 2018 15:33
-
-
Save samzeng/192dbf21dd3685df745e89d778cf68d9 to your computer and use it in GitHub Desktop.
检查用户是否打开开发者工具,并且记录打开次数
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var re = /x/; | |
var i = 0; | |
console.log(re); | |
re.toString = function () { | |
return alert('第 ' + (++i) + ' 次打开控制台'); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
还有一种方案是无限 debugger