Skip to content

Commit 07a5aac

Browse files
committed
readme update
1 parent ad39a67 commit 07a5aac

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,65 @@
11
# secure-web
2+
3+
secure-web is an npm package that prevents users from taking screenshots of your web page by securing it against various methods of screenshot capture.
4+
5+
## Installation
6+
7+
Install the package via npm:
8+
9+
```
10+
npm install secure-web
11+
```
12+
13+
## Usage
14+
15+
Simply import the `noScreenshot` function from the `secure-web` package and call it in your JavaScript code:
16+
17+
```javascript
18+
const noScreenshot = require('secure-web');
19+
20+
noScreenshot();
21+
```
22+
23+
This function will disable right-click, keyboard shortcuts, inspect element, print screen, and various other methods commonly used for taking screenshots. Additionally, it will overlay a message on the screen indicating that screenshots are disabled.
24+
25+
```html
26+
<!DOCTYPE html>
27+
<html lang="en">
28+
<head>
29+
<meta charset="UTF-8">
30+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
31+
<title>Secure Web Page</title>
32+
<script src="node_modules/secure-web/dict/secure-web.js"></script>
33+
</head>
34+
<body>
35+
<script>
36+
window.onload = function() {
37+
noScreenshot();
38+
};
39+
</script>
40+
</body>
41+
</html>
42+
```
43+
44+
## Example
45+
46+
```javascript
47+
const noScreenshot = require('secure-web');
48+
49+
window.onload = function() {
50+
noScreenshot();
51+
};
52+
```
53+
54+
## API
55+
56+
### noScreenshot()
57+
58+
The `noScreenshot` function disables various methods of taking screenshots and overlays a message on the screen indicating that screenshots are disabled.
59+
60+
## License
61+
62+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
63+
```
64+
65+
Make sure to replace `"path/to/secure-web.js"` in the example HTML with the actual path to your `secure-web.js` file. Also, customize the installation, usage, example, and API sections as necessary for your package.

0 commit comments

Comments
 (0)