You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,17 @@ noScreenshot({
28
28
disableFunctionKeys:true,
29
29
disableCtrlF4:true,
30
30
mouseLeave:true, // required for overlay with mouse leave a browser window
31
+
mouseEnterAutoHide:false, // required for auto hide overlay with mouse enter a browser window
31
32
ctrlOverlay:true,
32
33
altOverlay:false, // must be pass true for overlay with Alt or Options key press
33
34
shiftOverlay:false, // must be pass true for overlay with Shift key press
34
-
});
35
+
} , 'custom-overlay-id');
35
36
```
36
37
37
38
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.
38
39
40
+
Make sure to replace "custom-overlay-id" with the ID of the custom overlay you want to use, or omit it to use the default overlay.
41
+
39
42
```html
40
43
<!DOCTYPE html>
41
44
<htmllang="en">
@@ -75,6 +78,7 @@ The `noScreenshot` function accepts the following options:
75
78
-`disableFunctionKeys`: Disables function keys (F1-F12).
76
79
-`disableCtrlF4`: Disables the Ctrl+F4 key combination.
77
80
-`mouseLeave`: Activates overlay when cursor leaves the window.
81
+
-`mouseEnterAutoHide`: Activates overlay when cursor enters the window.
78
82
-`ctrlOverlay`: Activates overlay when Ctrl or Command key is pressed.
79
83
-`altOverlay`: Activates overlay when Alt or Options key is pressed.
80
84
-`shiftOverlay`: Activates overlay when Shift key is pressed.
@@ -94,10 +98,11 @@ window.onload = function() {
94
98
disableFunctionKeys:true,
95
99
disableCtrlF4:true,
96
100
mouseLeave:true,
101
+
mouseEnterAutoHide:false,
97
102
ctrlOverlay:true,
98
103
altOverlay:true,
99
104
shiftOverlay:true,
100
-
});
105
+
} , 'custom-overlay-id');
101
106
};
102
107
```
103
108
@@ -115,9 +120,11 @@ The `noScreenshot` function disables various methods of taking screenshots and o
115
120
-`disableFunctionKeys`
116
121
-`disableCtrlF4`
117
122
-`mouseLeave`
123
+
-`mouseEnterAutoHide`
118
124
-`ctrlOverlay`
119
125
-`altOverlay`
120
126
-`shiftOverlay`
127
+
-`overlayId`: Optional parameter to specify the ID of a custom overlay to use instead of the default one.
Copy file name to clipboardExpand all lines: package.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "secure-web",
3
-
"version": "1.1.0",
3
+
"version": "1.1.1",
4
4
"description": "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. With customizable options to tailor the security measures according to your needs, Secure-Web ensures that your sensitive information remains protected and inaccessible to unauthorized individuals. Embrace the power of Secure-Web and take control of your online security today.",
0 commit comments