
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@wprimadi/lockdown
Advanced tools
LOCKDOWN (Log Obfuscation & Console Kill-switch with Devtools Override Warning Network) - Lightweight JavaScript library to secure your website by blocking DevTools access, disabling context menu, shortcuts, text copy/cut/select, and more. Built for front
Log Obfuscation & Console Kill-switch with Devtools Override Warning Network
LOCKDOWN is a lightweight JavaScript library designed to protect your website from unwanted user interactions such as opening DevTools, copying text, right-clicking, and more. This library helps you add an extra layer of front-end security in just a few lines of code.
You can include it directly in your HTML file:
<script src="lockdown.js"></script>
Or serve it via NPM/CDN:
You can include B.A.R.R.I.C.A.D.E from a CDN:
<script src="https://cdn.jsdelivr.net/gh/wprimadi/lockdown@v1.0.0/lockdown.min.js"></script>
Or the latest version:
<script src="https://cdn.jsdelivr.net/gh/wprimadi/lockdown/lockdown.min.js"></script>
Install via NPM:
npm install @wprimadi/lockdown
Or use it from the CDN NPM package:
<script src="https://cdn.jsdelivr.net/npm/@wprimadi/lockdown/lockdown.min.js"></script>
For more details, visit the NPM page.
window.addEventListener('DOMContentLoaded', () => {
lockdown.init({
redirectUrl: '/access_denied', // URL to redirect when DevTools is opened
disableContextMenu: true, // Default: true
disableShorcuts: true, // Default: true
disableTextCopy: true, // Default: true
disableTextCut: true, // Default: true
disableTextSelection: true, // Default: true
disableMouseDown: true, // Default: true
disableDevTools: true // Default: true
});
});
All options are optional. If omitted, they will use the default values.
| Option | Type | Default | Description |
|---|---|---|---|
redirectUrl | string | empty string | URL to redirect when DevTools is detected. Leave empty to skip redirect. |
disableContextMenu | bool | true | Disable right-click menu. |
disableShorcuts | bool | true | Block developer tool-related keyboard shortcuts. |
disableTextCopy | bool | true | Prevent users from copying text. |
disableTextCut | bool | true | Prevent users from cutting text. |
disableTextSelection | bool | true | Disable text selection on the page. |
disableMouseDown | bool | true | Disable mouse down interaction. |
disableDevTools | bool | true | Enable/disable DevTools detection mechanism. |
LOCKDOWN is perfect for:
LOCKDOWN has been tested and verified on the following browsers:
This library only provides basic obfuscation and deterrence. It is not a foolproof security solution and should be used alongside proper backend validation and security best practices.
MIT License © 2025 Wahyu Primadi
FAQs
LOCKDOWN (Log Obfuscation & Console Kill-switch with Devtools Override Warning Network) - Lightweight JavaScript library to secure your website by blocking DevTools access, disabling context menu, shortcuts, text copy/cut/select, and more. Built for front
We found that @wprimadi/lockdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.