From 576ad1f74ab67c6a10f93654e17dd989761e794c Mon Sep 17 00:00:00 2001 From: s4luorth Date: Sun, 7 Jun 2026 15:31:28 +0200 Subject: [PATCH] fix: pfeil groesser, tab ohne fokus-kasten, version 1.1.0 (cache-bust) - Aufklapp-Pfeil deutlich groesser (26px). - Tabs: kein Fokus-Kasten mehr, nur untere Linie markiert den aktiven Tab. - CB_VERSION + Header auf 1.1.0 -> bricht gecachte alte admin.js/frontend.js (Ursache, dass ein Dienst auf einer Seite nicht aufklappbar war). - Aufklappen via Event-Delegation (robust gegen Load-Order/dynamische Zeilen). Co-Authored-By: Claude Opus 4.8 --- gdpr-content-blocker/assets/admin.js | 17 ++++++++--------- gdpr-content-blocker/gdpr-content-blocker.php | 4 ++-- .../includes/class-settings.php | 13 ++++++++++--- gdpr-content-blocker/readme.txt | 11 ++++++++++- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/gdpr-content-blocker/assets/admin.js b/gdpr-content-blocker/assets/admin.js index a4f3213..f940db6 100644 --- a/gdpr-content-blocker/assets/admin.js +++ b/gdpr-content-blocker/assets/admin.js @@ -30,16 +30,15 @@ const $btn = $( '.cb-service-toggle', box ); $btn.attr( 'aria-expanded', open ? 'true' : 'false' ).text( open ? '▾' : '▸' ); } + /* Delegated once on document → works for existing AND dynamically added rows, + * and is resilient to load-order issues. */ + $( document ).on( 'click', '.cb-service-toggle, .cb-service-title', function () { + const box = $( this ).closest( '.cb-service-box' ); + const open = $( '.cb-service-toggle', box ).attr( 'aria-expanded' ) !== 'true'; + setExpanded( box, open ); + } ); function bindToggle( box ) { - $( '.cb-service-toggle', box ).on( 'click', function () { - const open = $( this ).attr( 'aria-expanded' ) !== 'true'; - setExpanded( box, open ); - } ); - // Clicking the title also expands/collapses. - $( '.cb-service-title', box ).on( 'click', function () { - const open = $( '.cb-service-toggle', box ).attr( 'aria-expanded' ) !== 'true'; - setExpanded( box, open ); - } ); + // No-op kept for call sites; toggling is handled by delegation above. } /* ── Re-index a row's field names after a remove ── */ diff --git a/gdpr-content-blocker/gdpr-content-blocker.php b/gdpr-content-blocker/gdpr-content-blocker.php index e7cbf8e..b7a7884 100644 --- a/gdpr-content-blocker/gdpr-content-blocker.php +++ b/gdpr-content-blocker/gdpr-content-blocker.php @@ -3,7 +3,7 @@ * Plugin Name: GDPR Content Blocker * Plugin URI: https://lucas-orth.de * Description: DSGVO-konformer Consent-Blocker für externe iframes. Lädt Drittinhalte erst nach aktiver Einwilligung. - * Version: 1.0.0 + * Version: 1.1.0 * Author: Lucas Orth * Author URI: https://lucas-orth.de * Text Domain: gdpr-content-blocker @@ -15,7 +15,7 @@ defined( 'ABSPATH' ) || exit; -define( 'CB_VERSION', '1.0.0' ); +define( 'CB_VERSION', '1.1.0' ); define( 'CB_FILE', __FILE__ ); define( 'CB_DIR', plugin_dir_path( __FILE__ ) ); define( 'CB_URL', plugin_dir_url( __FILE__ ) ); diff --git a/gdpr-content-blocker/includes/class-settings.php b/gdpr-content-blocker/includes/class-settings.php index f085096..45ab11c 100644 --- a/gdpr-content-blocker/includes/class-settings.php +++ b/gdpr-content-blocker/includes/class-settings.php @@ -417,9 +417,9 @@ class CB_Settings { } /* expand/collapse arrow (black, no box) */ .cb-admin-wrap .cb-service-toggle { - width: 24px; - height: 24px; - font-size: 16px; + width: 32px; + height: 32px; + font-size: 26px; line-height: 1; font-weight: 400; color: #1d2327; @@ -462,6 +462,13 @@ class CB_Settings { font-weight: 600; margin-bottom: -1px; } + /* No focus box on tabs — only the bottom underline marks the active tab. */ + .cb-admin-wrap .nav-tab:focus, + .cb-admin-wrap .nav-tab:focus-visible, + .cb-admin-wrap .nav-tab:active { + box-shadow: none; + outline: none; + } /* 20px breathing room between tabs and content */ .cb-admin-wrap .cb-tab-content { padding-top: 20px; diff --git a/gdpr-content-blocker/readme.txt b/gdpr-content-blocker/readme.txt index cc26558..143f8a9 100644 --- a/gdpr-content-blocker/readme.txt +++ b/gdpr-content-blocker/readme.txt @@ -4,7 +4,7 @@ Tags: dsgvo, gdpr, consent, iframe, datenschutz, gdpr-content-blocker Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 8.1 -Stable tag: 1.0.0 +Stable tag: 1.1.0 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -93,6 +93,15 @@ ZIP muss einen Ordner `gdpr-content-blocker/` auf oberster Ebene enthalten. == Changelog == += 1.1.0 = +* Vorlagen für Google Maps, YouTube, OpenStreetMap, Vimeo +* Client-seitige Erkennung (Elementor-Videos, per JS nachgeladene iframes) +* Webseiten-Scan mit Vorlagenerkennung und Quellseiten +* Dienste ein-/ausklappbar mit An-/Aus-Schalter +* Lizenz- und Update-Auslieferung über eigenen Server +* Sprachen: Deutsch + Englisch +* Widerruf als Link; Tab „Über das Plugin"; diverse UI-Verbesserungen + = 1.0.0 = * Erstveröffentlichung