Skip to content

🛡️ A lightweight JavaScript library to block screenshots, screen recordings, and print shortcuts—designed for protecting sensitive content on modern websites.

License

Notifications You must be signed in to change notification settings

dxvzz/Screenshot-PrivacyProtectionWeb

Repository files navigation

Privacy Icon

🛡️ Screenshot Privacy Protection Web

Status License JavaScript

🧠 Introduction

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.

✨ Key Features

  • 🔒 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

📸 Demo Preview

🌐 Live Demo

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>

📦 Installation

🔗 Via CDN

<script src="https://unpkg.com/screenshot-privacy-protect/dist/privacy-protect.min.js"></script>

📦 Via NPM

npm install screenshot-privacy-protect

⚙️ Usage Guide

Basic Activation

<script>
  PrivacyProtect.enable();
</script>

With Options

PrivacyProtect.enable({
  feedback: true,
  blockPrint: true,
  watermarkText: '🛡️ Protected Content'
});

Turn Off Protection

PrivacyProtect.disable();

⚙️ Configuration Table

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

📁 File Structure

📦 Screenshot-PrivacyProtectionWeb
├── privacy-protect.js        # Core script
├── index.html                # Sample usage
└── README.md                 # This file

🤝 Contribution

Love this idea? Help us improve!

  • Fork the repo
  • Make your improvements
  • Submit a pull request 🙌

📜 License

Released under the MIT License.

🧡 Credits

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."