Screenshot-PrivacyProtectionWeb is a powerful JavaScript tool that helps developers protect sensitive content from being captured via screenshots or screen recordings. It adds a client-side layer of privacy with zero dependencies, perfect for modern web apps, dashboards, and secure portals.
- 🔒 Prevent screenshots using CSS tricks & JavaScript
- 🎥 Deter screen recording with visual overlays
- 🖼️ Customizable watermark on protected content
- 🧠 Display alerts when protection is triggered
- 🚫 Disable print and screen capture shortcuts
- ⚡ Lightweight and dependency-free
Or try out the basic functionality in your own project:
<script src="https://unpkg.com/screenshot-privacy-protect/dist/privacy-protect.min.js"></script>
<script>
PrivacyProtect.enable({
feedback: true,
watermarkText: "🔒 Confidential Area"
});
</script><script src="https://unpkg.com/screenshot-privacy-protect/dist/privacy-protect.min.js"></script>npm install screenshot-privacy-protect<script>
PrivacyProtect.enable();
</script>PrivacyProtect.enable({
feedback: true,
blockPrint: true,
watermarkText: '🛡️ Protected Content'
});PrivacyProtect.disable();| Option | Type | Default | Description |
|---|---|---|---|
feedback |
Boolean | true |
Display user feedback when blocking |
blockPrint |
Boolean | true |
Block keyboard print/capture shortcuts |
watermarkText |
String | '' |
Overlay custom text on sensitive sections |
📦 Screenshot-PrivacyProtectionWeb
├── privacy-protect.js # Core script
├── index.html # Sample usage
└── README.md # This file
Love this idea? Help us improve!
- Fork the repo
- Make your improvements
- Submit a pull request 🙌
Released under the MIT License.
Developed by Devdatta M
Inspired by mobile privacy standards like FLAG_SECURE on Android & secure overlays on iOS
"Privacy is not a feature. It's a right. Protect it."