الوصف
Xiaochen Content Copy Controls is a lightweight content-protection plugin that prevents visitors from copying your page content via right-click, F12 (DevTools) or the copy action.
Main features
- Block F12 / DevTools: blocks visitors who press F12 or open DevTools, with an optional custom redirect URL.
- Block right-click (copy & select): disables the context menu, text selection and copying.
- Copy reminder: shows a custom reminder popup when visitors copy, with three popup styles (native alert, SweetAlert, layer).
- Customizable reminder text: set your own popup message. Default: “Successfully copied! Feel free to repost – your repost is my greatest recognition!”
- Zero configuration: works immediately after saving the settings; no external services are used.
Important notes
- “Block right-click” and “Copy reminder” are mutually exclusive – only one of them can be enabled at a time (the plugin handles this automatically on save).
- This plugin only stops ordinary users from copying. It cannot prevent advanced methods such as viewing page source or disabling JavaScript. Do not treat it as absolute content protection.
Credits
Xiaochen Content Copy Controls was originally created and is maintained by ts小陈 (www.kqwq.com). The DevTools blocker is based on the open-source ConsoleBan (console-ban v2.1.0, MIT License).
التنصيب
How to install
- Upload the plugin zip via “Plugins > Add New > Upload Plugin” in your WordPress admin, then activate it. Alternatively, extract the zip to the
wp-content/plugins/directory and activate it from the “Plugins” menu. - After activation, find the “Right-click Settings” menu item in the admin sidebar and open the settings page.
Settings guide
- Block Modes:
- Enable “Block F12 / DevTools”: blocks visitors who press F12 or open DevTools, with an optional redirect URL.
- Enable “Block right-click (copy & select)”: disables the context menu, text selection and copying.
- DevTools Redirect URL (shown when F12 blocking is enabled): the URL visitors are redirected to when they open DevTools. Leave empty to disable the redirect.
- Copy reminder: enable it to show a reminder popup when visitors copy.
- Popup Style: choose one of three styles (Style 1: native alert; Style 2: SweetAlert; Style 3: layer).
- Copy Reminder Text: customize the popup message.
- Click “Save Settings” – everything takes effect on the front end immediately.
For more tutorials, visit the plugin homepage: https://www.kqwq.com/wordpress/plugins/1881.html
الأسئلة المتكررّة
-
Can “Block right-click” and “Copy reminder” be enabled at the same time?
-
No. They are mutually exclusive because the copy reminder needs to listen to the copy event, while blocking right-click intercepts it. The plugin disables one of them automatically when you save.
-
Why does the F12 redirect not happen in some browsers?
-
The legacy DevTools detection relies on browser quirks that newer browsers (e.g. Chrome 93+) have patched. The plugin also hooks the keyboard directly, so pressing F12 / Ctrl+Shift+I(J,C) triggers the redirect immediately in modern browsers. Note that a web page cannot fully prevent the browser from opening DevTools.
-
Does the plugin affect loading speed or SEO?
-
Almost not. It only outputs a small inline script and one JS file (console-ban.js, about 3KB) on the front end, with no external CDN or remote requests.
-
Is it compatible with mobile devices?
-
Yes. Long-press selection and copying are also intercepted on mobile (depending on the enabled mode).
-
Can administrators be exempted?
-
The current version does not include a role-based exemption. The plugin only affects the front end for visitors and never interferes with admin actions.
المراجعات
لا توجد مراجعات لهذه الإضافة.
المساهمون والمطوّرون
“Xiaochen Content Copy Controls” هو برنامج مفتوح المصدر. وقد ساهم هؤلاء الأشخاص بالأسفل في هذه الإضافة.
المساهمونترجمة ”Xiaochen Content Copy Controls“ إلى لغتك.
مُهتم بالتطوير؟
تصفّح الشفرة، تحقق من مستودع SVN، أو الاشتراك في سجل التطوير بواسطة RSS.
سجل التغييرات
1.6
- Plugin renamed to “Xiaochen Content Copy Controls” (slug: xiaochen-content-copy-controls) to make the name distinctive, per the plugin review guidelines.
- Text domain updated to xiaochen-content-copy-controls.
- Settings page scripts moved into an enqueued admin.js (wp_enqueue_script + wp_localize_script); no more inline tags.
1.5
- All interface strings are now English source strings (required by WordPress.org); Chinese sites display Chinese automatically via the built-in Simplified Chinese language pack.
- Plugin renamed to “Xiaochen Content Copy Controls” with the slug xiaochen-content-copy-controls.
- Main file renamed to xiaochen-content-copy-controls.php (settings page renamed accordingly).
- Fixed the plugin description translation on the plugins list page for Chinese sites.
- Settings page upgraded to “Settings / Help” tabs with a flat colorful design (custom styles, layui removed).
- F12 blocking now uses reliable keyboard-level interception with an optional redirect; the DevTools redirect URL is shown as a matched setting when F12 blocking is enabled.
- The mutual-exclusion notice now uses a custom toast instead of the native alert.
1.4
- Removed the external plugin update checker (plugin-updates); updates now come from the official WordPress.org repository.
- Removed the obfuscated tracking code (my-tracker.php).
- Added full i18n support with a bundled Simplified Chinese language pack (languages/).
- Hardened the admin area: nonce checks, input sanitization and escaping, manage_options capability.
- Removed external CDN (BootCDN) jQuery and remote ad scripts; the bundled WordPress jQuery is used instead.
- Added a “Usage Help” panel and an admin Help tab to the settings page.
- The version shown on the settings page is now read from the plugin header.
1.3
- Added copy reminder styles 2 (SweetAlert) and 3 (layer) with customizable reminder text.
- Fixed the mutual-exclusion logic between the copy reminder and right-click blocking.
