개발자 도구 이벤트 발생 시키기
Client Side/JAVA Script2023. 12. 11. 01:19
GitHub - AEPKILL/devtools-detector: Detect if DevTools is open
Detect if DevTools is open. Contribute to AEPKILL/devtools-detector development by creating an account on GitHub.
github.com
&&
<script>
(function(){
var _z = console;
Object.defineProperty( window, "console", {
get : function(){
if( _z._commandLineAPI ){
throw "Sorry, Can't execute scripts!";
}
return _z;
},
set : function(val){
_z = val;
}
});
window.console.log = function(){
console.error('Sorry , developers tools are blocked here....');
window.console.log = function() {
return false;
}
}
})();
try
{
// Check if it's open
console.log('Is DevTools open:', window.devtools.isOpen);
// Get notified when it's opened/closed or orientation changes
window.addEventListener('devtoolschange', event => {
var log = String(event.detail.isOpen);
console.log('Is DevTools open:B', log);
if(log == '') {
} else if(log == 'true') {
}
});
var log = String(window.devtools.isOpen);
if(log == '') {
} else if(log == 'true') {
console.log('Is DevTools open:A', log);
}
}
catch (e)
{
}
</script>
```
이런게 있더라고요
하지만 개발자모드를 창모드로 열면 소용 없더라요
출처 -
'Client Side > JAVA Script' 카테고리의 다른 글
(윈도우 or 맥북) 리액트 phpstorm & webstorm 에서 세팅 (2) | 2023.12.22 |
---|---|
자바스크립트 ES6 문법 정리 (0) | 2023.12.22 |
숫자를 한글로 (2) | 2023.12.01 |
정규식 활용 한 자바스크립트 비밀번호 로직 (0) | 2016.08.07 |
창 닫을 때 안내 메시지 띄워주기 (0) | 2015.04.24 |