=== Kripanov Anticopia ===
Contributors: kripanov
Tags: anti-copy, copy-protection, right-click, devtools, anti-scraping
Requires at least: 6.3
Tested up to: 7.0
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Anti-copy protection: disables right-click, text selection, copy, paste, keyboard shortcuts, mobile long-press and browser inspection tools.

== Description ==

**Kripanov Anticopia** protects your WordPress content against content theft and web scraping. When activated, it disables keyboard shortcuts, right-click, copy and paste, text selection, image dragging, mobile long-press and browser inspection tools on your website.

In addition to the common copy methods, the anti-copy protection also blocks inspection tools (DevTools), poisons the clipboard on blocked copy attempts, and lets you exclude specific roles or URLs.

= Features =

* Disable the right-click context menu.
* Prevent text selection across the whole site.
* Block copy, cut and paste actions.
* Replace copied text with a custom protection notice (clipboard poison).
* Block keyboard shortcuts: `Ctrl/Cmd+C`, `Ctrl/Cmd+X`, `Ctrl/Cmd+V`, `Ctrl/Cmd+A`, `Ctrl/Cmd+S`.
* Block browser inspection tools: `F12`, `Ctrl/Cmd+Shift+I/J/C/K`, `Cmd+Option+I`, `Ctrl/Cmd+U`.
* Basic detection of DevTools being open.
* Prevent image dragging and add extra figure overlays.
* Block mobile long-press / callout gestures.
* Block printing (`Ctrl/Cmd+P`) and hide content on print.
* Early inline guard in `<head>` to reduce the unprotected load window.
* Customizable notice message shown when a copy attempt is made.
* Option to exclude administrators, specific roles and URL paths.
* Full settings panel under **Settings > Anticopia**.

= Compatibility =

Compatible with WordPress 7.0 and PHP 7.4 or greater. Uses the `defer` loading strategy of `wp_enqueue_script` (available since WP 6.3) to avoid blocking page rendering. Frontend-only: does not load scripts in wp-admin or the block editor, so it is unaffected by the iframed editor changes in WordPress 7.0.

= Privacy =

This plugin does **not** collect, send or store any personal data from your visitors. All processing happens client-side in the visitor's browser.

== Installation ==

1. Upload the `kripanov-anticopia` folder to the `/wp-content/plugins/` directory, or install the plugin from the **Plugins > Add New** menu in WordPress.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings > Anticopia** and adjust the protections you want to apply.
4. Save your changes.

== Frequently Asked Questions ==

= Is the anti-copy protection 100% foolproof? =

No. No client-side protection is absolute: a technically skilled user can disable JavaScript or use advanced tools. However, for 99% of visitors and simple scrapers the protection is very effective and greatly hinders content theft.

= Can administrators be excluded from the protection? =

Yes. By default, users with the `manage_options` capability are excluded so they can continue editing, copying and inspecting the site during their work. This option can be disabled from the plugin settings. You can also exclude additional roles and specific URL paths.

= Does it affect site performance? =

Not noticeably. The script is very lightweight and is loaded with the `defer` strategy so it does not block page rendering. A tiny early guard is also printed in the document head.

= Does it work with contact forms and comments? =

Yes. The plugin detects `input`, `textarea`, `select` fields and elements with `contenteditable="true"`, allowing users to type, copy and paste inside them normally.

= Does it work on mobile devices? =

Yes. Selection, context menu, image dragging and long-press protections work on both desktop and mobile devices.

= Can I customize the notice message? =

Yes. From **Settings > Anticopia** you can edit the toast text and the clipboard replacement text shown when a visitor tries to copy content.

== Screenshots ==

1. Plugin settings panel under **Settings > Anticopia**.
2. Floating notice shown when attempting to copy content.
3. Granular options to enable or disable each type of protection.

== Changelog ==

= 1.1.0 =
* Clipboard poison: replace blocked copy/cut content with a custom notice text.
* Mobile long-press / touch-callout protection.
* Extra image protection (figure overlays, block Ctrl/Cmd+click and middle-click on images).
* Exclude protection by WordPress role slugs.
* Exclude protection by URL / path patterns (supports `*`).
* Early inline guard in `wp_head` to reduce the unprotected window before deferred JS loads.
* Improved editable-field detection (`select`, nested `contenteditable`).
* Expanded macOS DevTools shortcuts (Cmd+Option+I/J/C/U).
* Skip protection on the WordPress login screen.

= 1.0.1 =
* Verified compatibility with WordPress 7.0.
* Replaced `wp_localize_script()` with `wp_add_inline_script()` for passing configuration to JavaScript.
* Minimum WordPress version raised to 6.3 (required for the `defer` script loading strategy).

= 1.0.0 =
* Initial release.
* Disables right-click, text selection, copy, cut and paste.
* Blocks keyboard shortcuts (Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+A, Ctrl+S, Ctrl+P).
* Blocks browser inspection tools (F12, Ctrl+Shift+I/J/C/K, Ctrl+U).
* Basic detection of DevTools being open.
* Prevents image dragging.
* Blocks printing and hides content via `@media print`.
* Admin settings panel with granular options.
* Customizable notice message.
* Option to exclude administrators.
* Compatible with WordPress 6.9 and PHP 7.4+.

== Upgrade Notice ==

= 1.1.0 =
Stronger client-side protection: clipboard poison, mobile gestures, image overlays and role/URL exclusions.

= 1.0.1 =
Verified compatibility with WordPress 7.0.

= 1.0.0 =
Initial stable release. Full anti-copy protection compatible with WordPress 6.9.
