Changeset 3735578
- Timestamp:
- 10/08/2026 09:36:13 PM (11 days ago)
- Location:
- disable-right-click-rb
- Files:
-
- 15 added
- 2 deleted
- 5 edited
-
tags/2.0.1 (added)
-
tags/2.0.1/assets (added)
-
tags/2.0.1/assets/images (added)
-
tags/2.0.1/assets/images/index.html (added)
-
tags/2.0.1/assets/images/logo_rg.gif (added)
-
tags/2.0.1/assets/images/upzilla_black_logo.svg (added)
-
tags/2.0.1/assets/index.html (added)
-
tags/2.0.1/assets/js (added)
-
tags/2.0.1/assets/js/rb-admin-settings.js (added)
-
tags/2.0.1/class_rb_disable_right_click.php (added)
-
tags/2.0.1/class_rb_disable_right_click_key.php (added)
-
tags/2.0.1/disable-right-click-rb.php (added)
-
tags/2.0.1/information.php (added)
-
tags/2.0.1/options.php (added)
-
tags/2.0.1/readme.txt (added)
-
trunk/assets/js/rb-admin-settings.js (modified) (8 diffs)
-
trunk/class_rb_disable_right_click.php (modified) (3 diffs)
-
trunk/disable-right-click-rb.php (modified) (2 diffs)
-
trunk/information.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-1.png (deleted)
-
trunk/screenshot-2.png (deleted)
Legend:
- Unmodified
- Added
- Removed
-
disable-right-click-rb/trunk/assets/js/rb-admin-settings.js
r3735431 r3735578 6 6 * settings card on the left (tabs: Protection, Advanced, Watermark), Help 7 7 * card on the right (Hints / FAQ / About) that updates via [data-help-key] 8 * delegation. Watermark is a PRO tab: locked-upsell card when the PRO 9 * add-on isn't installed (data.pro is false), real fields — saved via the 10 * add-on's own AJAX action — when it is. Dependency-free, saved via 8 * delegation. Watermark and "PRO: fine-grained control" are PRO sections: 9 * without the add-on (data.pro is false) their fields are shown switched 10 * off and marked PRO, with a link to the pricing; with it they are live and 11 * saved via the add-on's own AJAX actions. Dependency-free, saved via 11 12 * fetch() to admin-ajax.php. 12 13 */ … … 105 106 + '.about-link.primary{background:#6750a4;color:#fff;}' 106 107 + '.about-link.primary:hover{background:#5a4592;}' 107 + '.warn-card{background:#fff4e5;border:1px solid #f0c04e;border-radius:10px;padding:14px 16px;margin-bottom:18px;}' 108 + '.warn-card strong{display:block;font-size:13px;color:#6b4e00;margin-bottom:4px;}' 109 + '.warn-card p{font-size:13px;color:#7a5c00;margin:0;line-height:1.5;}' 108 + '.warn-card{display:flex;align-items:center;gap:10px;background:#fff4e5;border:1px solid #f0c04e;' 109 + 'border-radius:10px;padding:9px 14px;margin-bottom:16px;}' 110 + '.warn-card .warn-icon{font-size:20px;line-height:1;color:#b07a00;flex-shrink:0;}' 111 + '.warn-card p{font-size:13px;color:#7a5c00;margin:0;line-height:1.4;}' 110 112 + '.pro-badge{background:linear-gradient(135deg,#8b5cf6,#6750a4);color:#fff;font-size:10px;' 111 113 + 'font-weight:700;padding:2px 7px;border-radius:10px;letter-spacing:.02em;}' 112 + '.locked-card{background:#12141c;color:#e7e4ef;border-radius:12px;padding:22px 24px;}' 113 + '.locked-card h3{margin:0 0 8px;font-size:15px;font-weight:600;color:#fff;}' 114 + '.locked-card p{margin:0 0 16px;font-size:13px;line-height:1.6;color:#cfcbe0;}' 115 + '.locked-cta{display:inline-block;background:#f5c542;color:#12141c;border-radius:8px;padding:10px 18px;' 116 + 'font-size:13px;font-weight:600;text-decoration:none;}' 117 + '.locked-cta:hover{background:#ffd75e;}' 114 + '.pro-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f4eff9;border-radius:10px;' 115 + 'padding:9px 14px;margin-bottom:16px;font-size:13px;line-height:1.4;color:#4a3b6e;}' 116 + '.pro-note a{margin-left:auto;font-weight:600;color:#6750a4;text-decoration:none;white-space:nowrap;}' 117 + '.pro-note a:hover{text-decoration:underline;}' 118 + '.is-locked .option,.is-locked .field{opacity:.55;cursor:not-allowed;}' 119 + '.is-locked .option:hover{background:none;}' 120 + '.is-locked input,.is-locked textarea,.is-locked select,.is-locked button{cursor:not-allowed;}' 121 + '.is-locked button.save:disabled{background:#c9c2d9;}' 122 + '.legend-badge{margin-left:8px;vertical-align:1px;text-transform:none;}' 118 123 + 'select{border:1px solid #cac4d0;border-radius:8px;padding:7px 10px;font-size:13px;font-family:inherit;}' 119 124 + '.wm-row{display:flex;gap:12px;flex-wrap:wrap;}' … … 146 151 } ); 147 152 return node; 153 } 154 155 /** One slim line above a PRO section a free user sees: what it is, and where to get it. */ 156 function proNote( text ) { 157 return el( 'div', { class: 'pro-note' }, [ 158 el( 'span', { text: text } ), 159 el( 'a', { href: data.watermarkBuyUrl, target: '_blank', rel: 'noopener', text: s.proUnlockLink } ), 160 ] ); 161 } 162 163 /** 164 * Free users: the PRO fields stay visible but switched off — every 165 * control disabled, each group marked PRO. Hints still show on hover. 166 */ 167 function lockSection( node ) { 168 node.classList.add( 'is-locked' ); 169 [].forEach.call( node.querySelectorAll( 'input, textarea, select, button' ), function ( c ) { 170 c.disabled = true; 171 } ); 172 [].forEach.call( node.querySelectorAll( 'legend' ), function ( lg ) { 173 lg.appendChild( el( 'span', { class: 'pro-badge legend-badge', text: s.proBadge } ) ); 174 } ); 148 175 } 149 176 … … 358 385 // ====================================================================== 359 386 var advWarn = el( 'div', { class: 'warn-card' }, [ 360 el( 's trong', {text: '⚠' } ),387 el( 'span', { class: 'warn-icon', 'aria-hidden': 'true', text: '⚠' } ), 361 388 el( 'p', { text: s.advIntro } ), 362 389 ] ); … … 401 428 } 402 429 proExtrasWrap.appendChild( proExtrasHeading ); 403 404 430 if ( ! data.pro ) { 405 proExtrasWrap.appendChild( el( 'div', { class: 'locked-card' }, [406 el( 'h3', { text: s.proExtrasLockedTitle } ),407 el( 'p', { text: s.proExtrasLockedBody } ), 408 el( 'a', { class: 'locked-cta', href: data.watermarkBuyUrl, target: '_blank', rel: 'noopener', text: s.watermarkBuyCta } ),409 ] ) );410 } else{431 proExtrasWrap.appendChild( proNote( s.proPreviewExtras ) ); 432 } 433 434 // Built for everyone: free users see the same fields, switched off and 435 // marked PRO, so they know what the add-on gives them. 436 { 411 437 var pe = data.proExtras || {}; 412 438 var peState = { … … 513 539 proExtrasWrap.appendChild( allowFieldset ); 514 540 proExtrasWrap.appendChild( devtoolsFieldset ); 515 proExtrasWrap.appendChild( el( 'div', { class: 'actions' }, [ peSaveBtn, peStatus ] ) ); 541 if ( data.pro ) { 542 proExtrasWrap.appendChild( el( 'div', { class: 'actions' }, [ peSaveBtn, peStatus ] ) ); 543 } else { 544 lockSection( proExtrasWrap ); 545 } 516 546 } 517 547 advancedPanel.appendChild( proExtrasWrap ); … … 561 591 // ====================================================================== 562 592 if ( ! data.pro ) { 563 watermarkPanel.appendChild( el( 'div', { class: 'locked-card' }, [ 564 el( 'h3', { text: s.watermarkLockedTitle } ), 565 el( 'p', { text: s.watermarkLockedBody } ), 566 el( 'a', { class: 'locked-cta', href: data.watermarkBuyUrl, target: '_blank', rel: 'noopener', text: s.watermarkBuyCta } ), 567 ] ) ); 568 } else { 593 watermarkPanel.appendChild( proNote( s.proPreviewWatermark ) ); 594 } 595 { 569 596 var wm = data.watermark || {}; 570 597 var wmState = { … … 723 750 watermarkPanel.appendChild( wmLogoBlock ); 724 751 watermarkPanel.appendChild( wmExcludeFieldset ); 725 watermarkPanel.appendChild( el( 'div', { class: 'actions' }, [ wmSaveBtn, wmStatus ] ) ); 752 if ( data.pro ) { 753 watermarkPanel.appendChild( el( 'div', { class: 'actions' }, [ wmSaveBtn, wmStatus ] ) ); 754 } else { 755 lockSection( watermarkPanel ); 756 } 726 757 } 727 758 -
disable-right-click-rb/trunk/class_rb_disable_right_click.php
r3735431 r3735578 378 378 'roles' => $this->get_available_roles(), 379 379 'pro' => (bool) RB_DISABLE_RIGHT_CLICK_PRO, 380 'watermarkBuyUrl' => 'https://rbplugins.com/wordpress-plugins/disable-right-click-rb/ pro/',380 'watermarkBuyUrl' => 'https://rbplugins.com/wordpress-plugins/disable-right-click-rb/#pricing', 381 381 /** 382 382 * Free plugin only ever ships this inert default shape so the … … 450 450 'showMessageLabel' => __( 'Show a short message when a blocked action is attempted', 'disable-right-click-rb' ), 451 451 'messageTextLabel' => __( 'Message text', 'disable-right-click-rb' ), 452 'advIntro' => __( ' These go further than basic copy protection. Readthe Hints on the right before turning them on.', 'disable-right-click-rb' ),452 'advIntro' => __( 'Stronger measures — check the Hints on the right before turning them on.', 'disable-right-click-rb' ), 453 453 'optViewSource' => __( 'Block view-source shortcuts (Ctrl/⌘+U, F12, Ctrl+Shift+I/J/C)', 'disable-right-click-rb' ), 454 454 'optDevtools' => __( 'Show the message if DevTools appears to be open (best-effort, may false-positive)', 'disable-right-click-rb' ), 455 455 'tabWatermark' => __( 'Watermark', 'disable-right-click-rb' ), 456 456 'proBadge' => __( 'PRO', 'disable-right-click-rb' ), 457 ' watermarkLockedTitle' => __( 'Watermarking is a PRO feature', 'disable-right-click-rb' ),458 ' watermarkLockedBody' => __( 'Stamp your logo or site name onto every image automatically — a quick CSS overlay, or real server-side embedding into the image file itself, with exclusions by filename or image size.', 'disable-right-click-rb' ),459 ' watermarkBuyCta' => __( 'Get Disable Right Click RB PRO', 'disable-right-click-rb' ),457 'proPreviewWatermark' => __( 'Watermark every image with your logo or site name.', 'disable-right-click-rb' ), 458 'proPreviewExtras' => __( 'Protect more pages and decide what stays usable.', 'disable-right-click-rb' ), 459 'proUnlockLink' => __( 'Unlock PRO →', 'disable-right-click-rb' ), 460 460 'watermarkEnableLabel' => __( 'Watermark images on this site', 'disable-right-click-rb' ), 461 461 'watermarkModeLegend' => __( 'Mode', 'disable-right-click-rb' ), … … 475 475 'watermarkChangeLogo' => __( 'Change logo…', 'disable-right-click-rb' ), 476 476 'proExtrasTitle' => __( 'PRO: fine-grained control', 'disable-right-click-rb' ), 477 'proExtrasLockedTitle' => __( 'Fine-grained control is a PRO feature', 'disable-right-click-rb' ),478 'proExtrasLockedBody' => __( 'Extend protection to search results, 404, login and archive pages, protect only a specific list of URLs, allow right-click on chosen elements like links, and make DevTools detection actually do something.', 'disable-right-click-rb' ),479 477 'precisionScopeLegend' => __( 'Precision scope — also protect', 'disable-right-click-rb' ), 480 478 'ctxSearch' => __( 'Search results', 'disable-right-click-rb' ), -
disable-right-click-rb/trunk/disable-right-click-rb.php
r3735431 r3735578 2 2 /* 3 3 Plugin Name: Disable Right Click RB 4 Plugin URI: https:// www.rbplugins.com/disable-right-click-rb4 Plugin URI: https://rbplugins.com/wordpress-plugins/disable-right-click-rb/ 5 5 Description: Protects your content from being copied — right click, text selection, copy/paste, image dragging and view-source shortcuts, with per-content-type scope and role exceptions. 6 Version: 2.0. 06 Version: 2.0.1 7 7 Author: rbPlugins 8 8 Author URI: https://profiles.wordpress.org/rbplugins/ … … 16 16 } 17 17 18 define( 'RB_DISABLE_RIGHT_CLICK_VERSION', '2.0. 0' );18 define( 'RB_DISABLE_RIGHT_CLICK_VERSION', '2.0.1' ); 19 19 define( 'RB_DISABLE_RIGHT_CLICK_PATH', plugin_dir_path( __FILE__ ) ); 20 20 define( 'RB_DISABLE_RIGHT_CLICK_URL', plugin_dir_url( __FILE__ ) ); -
disable-right-click-rb/trunk/information.php
r3735431 r3735578 22 22 color: #f3f2f7; 23 23 border-radius: 12px; 24 padding: 2 2px 28px;24 padding: 26px 32px; 25 25 margin: 16px 25px 16px 0; 26 26 flex-wrap: wrap; … … 33 33 font-weight: 700; 34 34 white-space: nowrap; 35 margin-bottom: 10px; 35 36 } 36 37 .rbdrc-promo-brand .rbdrc-dot { … … 46 47 } 47 48 .rbdrc-promo-main h3 { 48 margin: 0 0 6px;49 margin: 0 0 16px; 49 50 font-size: 15px; 51 line-height: 1.4; 50 52 font-weight: 600; 51 53 color: #fff; -
disable-right-click-rb/trunk/readme.txt
r3735431 r3735578 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 07 Stable tag: 2.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 118 118 == Changelog == 119 119 120 = 2.0.1 = 121 * Settings screen: PRO options are now shown to free users, switched off and marked PRO, instead of an upsell card — see what the add-on gives you 122 * Settings screen: a compact one-line notice on the Advanced tab, and more room in the banner above the settings 123 * Fixed: PRO links now open the pricing section of the plugin's page 124 * Fixed: the Plugin URI pointed to an old address 125 * Fixed: with the PRO add-on, the "Login page" scope and login URLs in Opposite Mode now protect the login screen 126 * Fixed: no more "translation loading too early" notice in the debug log on WordPress 6.7+ 127 * Fixed: the numbered steps in Hints were numbered twice 128 120 129 = 2.0.0 = 121 130 * Complete rewrite: new settings screen (Protection / Advanced / Watermark tabs), built as a Shadow DOM app — faster, no WordPress admin theme conflicts … … 162 171 == Upgrade Notice == 163 172 164 = 2.0. 0=165 Major rewrite with a new settings screen and granular controls, plus an optional PRO add-on. Your existing on/off setting is migrated automatically — review the new Protection tab after updating to make sure the settings match what you expect.173 = 2.0.1 = 174 Settings screen polish: PRO options are previewed in place, fixed links to the plugin page and pricing.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)