web-page-secure
v1.1.1
Published
A baseline vanilla JS module to prevent automation to get your domain and copy over your code.
Downloads
1
Maintainers
Readme
web-page-secure
🔗 https://www.npmjs.com/package/web-page-secure
This is a baseline and extra light JS package that:
blocks Keyboard (key) actions -> Ctrl +
- A: select all action on the page
- C: copy action on the page
- F: find content on the page
- P: print webpage
- S: save entire webpage as HTML
- U: view source of webpage
disables context menu : right click (except for anchor elements to allow opening of links in new tab)
full page content selection
drag and drop content from page and hence prevents saving items on desktop
disables shortcut to debugger console (f12)
Installation:
npm install web-page-secure
Usage:
import { webPageSecure } from 'web-page-secure'
webPageSecure({
disableDragElements: true,
disableContentSelection: true,
disableRightClick: true,
disablePrint: true,
disableCtrlActions: ['all']
// enable master list as mentioned above.
// To block specific actions, pass an array with keys to be blocked
// Master List : ['a', 'c', 'f', 'p', 's', 'u', 'x', 'i', 'j', 'v','f12']
})
Roadmap:
Cross browser fixes (this is a cross-browser script but there are some old browsers which need support and hence this script needs further extension)
Streamline build from git to npm.