1.0.6 • Published 1 year ago

frontsecure v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

FrontSecure

FrontSecure is a JavaScript library to enhance the security of your web application's frontend by preventing access to DevTools, disabling text selection, blocking copy-paste, and more. It ensures a higher level of protection from common browser-based vulnerabilities and actions.

Installation

You can install the library via npm:

npm install frontsecure

Alternatively, use the CDN version:

<script src="https://cdn.jsdelivr.net/gh/ProfessorCodeDz/frontsecure/frontsecure.js"></script>

Init

    import FrontSecure from 'frontsecure';
    const secure = new FrontSecure();

Features

  • Prevent DevTools Access: Detects if DevTools is opened and redirects the user.
    secure.devTools('https://example.com');
  • Disable Context Menu: Disables right-click functionality.
    secure.contextMenu();
  • Prevent Viewing Source Code: Blocks the use of Ctrl+U and other shortcuts.
    secure.viewSource();
  • Disable Text Selection: Prevents users from selecting text.
    secure.textSelect();
  • Block Copy, Cut, and Paste: Disables copying, cutting, and pasting of content.
    secure.copy();
    secure.paste();
  • Disable Drag & Drop: Prevents dragging and dropping.
    secure.dragDrop();
  • Prevent Print Screen: Blocks print screen and Ctrl+P.
    secure.printScreen();
  • Disable Save Page Locally: Disables saving the page with Ctrl+S.
    secure.savePage();
  • Domain-Specific Execution: Ensures the page only runs on a specific domain.
    secure.runLocally('https://your-domain.com', 'https://redirect.com');
  • Run All Features:
    secure.all('https://example.com', 'https://your-domain.com', 'https://example.com');

Source Code

Github

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago