devtools-disabler

1.0.4 • Public • Published

Devtool disabler

This tool provides a simple solution to disable developer tools when they are docked, making it more challenging for candidates and participants to easily look up answers within the code during selections or workshops.

Usage

npm reference to install.

npm i devtools-disabler

script attribute

<script src="../project-root/node_modules/devtools-disabler/dist/devtools-disabler.js" defer></script>

Function

[!IMPORTANT]

  • This will not work when the developer tools are undocked.
  • The tool is not supported by Brave browser (only the shortcuts).

This tool is supported by the following browsers

  • Edge
  • Firefox
  • Chrome

Features

  • Right-click disabled
  • Disables menu option in the browser.
    • When accessing developer tools from the menu, the tool displays a message and blocks the original page content, prompting you to close the developer tools to restore the original content.
Shortcuts that are disabled
  • F12
  • ctrl + shift + i
  • ctrl + shift + j
  • ctrl + shift + c
  • shift + F3
  • shift + F5
  • shift + F7
  • shift + F9
  • shift + e
  • shift + m
  • shift + k
  • ctrl + u

Additional measures

If you also want to make sure that the user can't select like text, etc. Use the following property in your CSS

body {
    user-select: none;
}

Static Badge Static Badge

Readme

Keywords

Package Sidebar

Install

npm i devtools-disabler

Weekly Downloads

6

Version

1.0.4

License

MIT

Unpacked Size

11.9 kB

Total Files

16

Last publish

Collaborators

  • kodejo