Options and Customizing

By default, any ability to copy content is disabled. However, depending on your needs, you can enable or disable some of the options.

The following is an example code explaining each option.

document.addEventListener( 'DOMContentLoaded', function () {

    /** Content Protector Options. */
    let options = {

        /**
         * Disable Select All: Disable HotKeys: Ctrl+A (Windows and Linux), ⌘+A (macOS).
         * Protect Your Text from Being Copied by Select All HotKeys.
         **/
        disableSelectAll: true,

        /**
         * Disable Copy: Disable HotKeys: Ctrl+C (Windows and Linux), ⌘+C (macOS).
         * Protect Your Text from Being Copied by Copy HotKeys.
         **/
        disableCopy: true,

        /**
         * Disable Cut:	Disable HotKeys: Ctrl+X (Windows and Linux), ⌘+X (macOS).
         * Protect Your Text from Being Copied by Cut HotKeys.
         **/
        disableCut: true,

        /**
         * Disable Paste: Disable HotKeys: Ctrl+V (Windows and Linux), ⌘+V (macOS).
         * Disable Paste HotKeys.
         **/
        disablePaste: true,

        /**
         * Disable Save: Disable HotKeys: Ctrl+S (Windows and Linux), ⌘+S (macOS).
         * Protect Your Text from Being Saved by Save HotKeys.
         **/
        disableSave: true,

        /**
         * Disable View Source: Disable HotKeys: Ctrl+U (Windows and Linux), ⌘+U (macOS).
         * Disable to View Source Code of Page by HotKeys.
         **/
        disableViewSource: true,

        /**
         * Disable Print Page: Disable HotKeys: Ctrl+P (Windows and Linux), ⌘+P (macOS).
         * Protect Your Page from Being Printed by HotKeys.
         **/
        disablePrintPage: true,

        /**
         * Disable Developer Tool: Disable HotKeys: Ctrl+Shift+I (Windows and Linux), ⌘+⌥+I (macOS).
         * Disable to View Source Code of Page by Developer Tools.
         **/
        disableDeveloperTool: true,

        /**
         * Disable Safari Reader Mode: Disable Reader mode in Safari: ⌘+Shift+R (macOS).
         * Protect Your Text and Images from being copied in the Safari Reader mode.
         **/
        disableReaderMode: true,

        /**
         * Disable Right Click: Disable Mouse Right Click.
         * Protect Your Content from Being Copied by Context Menu.
         **/
        disableRightClick: true,

        /**
         * Disable Text Selection: Disable Text Selection.
         * Disable Text Highlight (Text Selection) by Mouse.
         **/
        disableTextSelection: true,

        /**
         * Disable Image Dragging by Mouse.
         **/
        disableImageDragging: true
    };

    new t42ContentProtector( options );

} );

Disable Select All: Disable HotKeys: Ctrl+A (Windows and Linux), ⌘+A (macOS)
Protect Your Text from Being Copied by Select All HotKeys.

Disable Copy: Disable HotKeys: Ctrl+C (Windows and Linux), ⌘+C (macOS)
Protect Your Text from Being Copied by Copy HotKeys.

Disable Cut: Disable HotKeys: Ctrl+X (Windows and Linux), ⌘+X (macOS)
Protect Your Text from Being Copied by Cut HotKeys.

Disable Paste: Disable HotKeys: Ctrl+V (Windows and Linux), ⌘+V (macOS)
Disable Paste HotKeys.

Disable Save: Disable HotKeys: Ctrl+S (Windows and Linux), ⌘+S (macOS)
Protect Your Text from Being Saved by Save HotKeys.

Disable View Source: Disable HotKeys: Ctrl+U (Windows and Linux), ⌘+U (macOS)
Disable to View Source Code of Page by HotKeys.

Disable Print Page: Disable HotKeys: Ctrl+P (Windows and Linux), ⌘+P (macOS)
Protect Your Page from Being Printed by HotKeys.

Disable Developer Tool: Disable HotKeys: Ctrl+Shift+I (Windows and Linux), ⌘+⌥+I (macOS)
Disable to View Source Code of Page by Developer Tools.

Disable Safari Reader Mode: Disable Reader mode in Safari: ⌘+Shift+R (macOS)
Protect Your Text and Images from being copied in the Safari Reader mode.

Disable Right Click: Disable Mouse Right Click
Protect Your Content from Being Copied by Context Menu.

Disable Text Selection: Disable Text Selection
Disable Text Highlight (Text Selection) by Mouse.

Disable Image Dragging by Mouse.