1.0.9 • Published 6 years ago

cracker-trap v1.0.9

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
6 years ago

Cracker Trap

JavaScript Style Guide Build Status

Detect if web developer tools is opened and change natural flow of webapps, you can override to redirect to another web page, show an alert or limit your own code.

Demo

Install

CDN

Yarn

$ yarn add cracker-trap

NPM

$ npm install --save cracker-trap

Usage

Always use cracker-trap.min.js file, which is in the build folder

<!-- 1) Insert on your own declarations-->
<script src="YOUR_ASSETS_PATH/cracker-trap/build/cracker-trap.min.js"></script>
<!-- 2) Use after declaration -->
<script>
	/// Single usage
	// checking if developer tools it's open
	console.log('is developer tools open?: ', window.devtools.open);
	// if DevTools is opened detect their orientation
	console.log('DevTools orientation?: ', window.devtools.orientation);
	// if DevTools is undocked from main page
	console.log('DevTools is undocked?: ', window.devtools.undocked);

	/// Listening event when state is change
	// Get state when itself is changed
	window.addEventListener('onDevToolsChange', function (e) {
		console.log('is DevTools open?', e.detail.open);
		console.log('DevTools orientation?', e.detail.orientation);
		console.log('DevTools is undocked?: ', e.details.undocked);
	});
</script>

Support

  • Chrome DevTools
  • Edge DevTools
  • Firefox DevTools
  • Opera DevTools
  • Firebug
  • Internet Explorer 11 DevTools

Standard

JavaScript Style Guide

License

GPL-3.0 © Reverse Bytes

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago