From 494518e98e19801764bfb02fc875cdcfd0192945 Mon Sep 17 00:00:00 2001 From: s4luorth Date: Mon, 8 Jun 2026 13:23:34 +0200 Subject: [PATCH] fix: kein s.w.org-emoji-request + kein weissraum unter dem blocker (v1.4.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) Das Warn-Emoji "⚠" im platzhalter-text loeste WordPress' wp-emoji aus, das die grafik von s.w.org nachlud (drittanbieter-request). Emoji aus den texten entfernt; das warn-dreieck wird jetzt rein per CSS gezeichnet (kein netzwerk). Hinweis: s.w.org ist der WP-emoji-CDN, NICHT Google. 2) Der platzhalter reservierte die hoehe des eingebetteten elements -> bei kuerzerem inhalt entstand weissraum darunter. Hoehen-reservierung entfernt (PHP min-height-style, JS minHeight, CSS min-height:180px) - der content blocker ist jetzt exakt so hoch wie sein eigener inhalt. Die original-masse bleiben als data-attribute fuer das iframe nach einwilligung erhalten. 3) Redundante, partielle de_DE-.po/.mo (mit altem emoji) entfernt - deutsche locales nutzen direkt die deutschen quell-strings. + version 1.4.3 (assets cache-busting). Co-Authored-By: Claude Opus 4.8 --- gdpr-content-blocker/assets/frontend.css | 15 ++- gdpr-content-blocker/assets/frontend.js | 5 +- gdpr-content-blocker/gdpr-content-blocker.php | 4 +- .../includes/class-renderer.php | 12 +- .../languages/gdpr-content-blocker-de_DE.mo | Bin 3230 -> 0 bytes .../languages/gdpr-content-blocker-de_DE.po | 125 ------------------ .../languages/gdpr-content-blocker-en_US.mo | Bin 12876 -> 12868 bytes .../languages/gdpr-content-blocker-en_US.po | 4 +- hilfsdaten/strings.txt | 2 +- hilfsdaten/translations-en.json | 4 +- 10 files changed, 27 insertions(+), 144 deletions(-) delete mode 100644 gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.mo delete mode 100644 gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.po diff --git a/gdpr-content-blocker/assets/frontend.css b/gdpr-content-blocker/assets/frontend.css index 68642ae..a1ba95b 100644 --- a/gdpr-content-blocker/assets/frontend.css +++ b/gdpr-content-blocker/assets/frontend.css @@ -23,7 +23,6 @@ display: flex; align-items: flex-start; /* pin content to the top */ justify-content: center; - min-height: 180px; /* fallback only; real height is set inline */ width: 100%; background-color: var(--cb-bg); color: var(--cb-text); @@ -31,7 +30,7 @@ padding: 24px 8px 20px; /* min 20px top/bottom, 8px sides */ font-family: inherit; border-radius: 4px; - overflow: auto; /* if text is taller than the embed, scroll, don't clip */ + /* No reserved height: the placeholder is exactly as tall as its content. */ } /* ── Inner content ── */ @@ -62,6 +61,18 @@ color: #f0b429; /* amber — universal caution, brand-neutral */ font-weight: 600; } +/* Caution marker drawn in pure CSS (no emoji → no s.w.org/emoji request). */ +.cb-blocker .cb-blocker__third-country::before { + content: ""; + display: inline-block; + width: 0; + height: 0; + margin-right: 6px; + vertical-align: -2px; + border-left: 0.45em solid transparent; + border-right: 0.45em solid transparent; + border-bottom: 0.8em solid currentColor; +} /* ── Privacy link ── */ .cb-blocker .cb-blocker__privacy-link { diff --git a/gdpr-content-blocker/assets/frontend.js b/gdpr-content-blocker/assets/frontend.js index 7a5b4a7..3374bdb 100644 --- a/gdpr-content-blocker/assets/frontend.js +++ b/gdpr-content-blocker/assets/frontend.js @@ -169,11 +169,10 @@ wrap.className = 'cb-blocker'; wrap.setAttribute( 'data-cb-id', svc.id ); wrap.dataset.src = src; + // Keep the dims for the iframe we create on consent, but do NOT reserve + // height — the placeholder is sized to its own content (no empty space). if ( dims.width ) wrap.dataset.width = dims.width; if ( dims.height ) wrap.dataset.height = dims.height; - if ( dims.height && /^\d+$/.test( String( dims.height ) ) ) { - wrap.style.minHeight = dims.height + 'px'; - } const inner = document.createElement( 'div' ); inner.className = 'cb-blocker__inner'; diff --git a/gdpr-content-blocker/gdpr-content-blocker.php b/gdpr-content-blocker/gdpr-content-blocker.php index ee773b6..00bd881 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.4.2 + * Version: 1.4.3 * 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.4.2' ); +define( 'CB_VERSION', '1.4.3' ); 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-renderer.php b/gdpr-content-blocker/includes/class-renderer.php index 08c742b..2160bf6 100644 --- a/gdpr-content-blocker/includes/class-renderer.php +++ b/gdpr-content-blocker/includes/class-renderer.php @@ -111,7 +111,7 @@ class CB_Renderer { 'i18n' => [ 'recipient' => __( 'Empfänger:', 'gdpr-content-blocker' ), 'purpose' => __( 'Zweck:', 'gdpr-content-blocker' ), - 'thirdCountry' => __( '⚠ Datenübermittlung in ein Drittland außerhalb der EU/des EWR', 'gdpr-content-blocker' ), + 'thirdCountry' => __( 'Datenübermittlung in ein Drittland außerhalb der EU/des EWR', 'gdpr-content-blocker' ), 'privacy' => __( 'Datenschutzerklärung des Anbieters', 'gdpr-content-blocker' ), 'load' => __( '%s jetzt laden', 'gdpr-content-blocker' ), 'remember' => __( 'Diesen Dienst künftig immer laden', 'gdpr-content-blocker' ), @@ -314,7 +314,7 @@ class CB_Renderer { $third_note = ''; if ( $third ) { $third_note = '' - . esc_html__( '⚠ Datenübermittlung in ein Drittland außerhalb der EU/des EWR', 'gdpr-content-blocker' ) + . esc_html__( 'Datenübermittlung in ein Drittland außerhalb der EU/des EWR', 'gdpr-content-blocker' ) . ''; } @@ -327,14 +327,12 @@ class CB_Renderer { $data_src = $src !== '' ? ' data-src="' . esc_attr( $src ) . '"' : ''; - // Reserve the embed's height so the layout doesn't jump, and remember the - // original dimensions for the iframe that gets created on consent. + // Remember the original dimensions for the iframe that gets created on + // consent. The placeholder itself is sized to its own content (no reserved + // height), so there is no empty space below it. $width = isset( $dims['width'] ) ? (string) $dims['width'] : ''; $height = isset( $dims['height'] ) ? (string) $dims['height'] : ''; $style_at = ''; - if ( $height !== '' && ctype_digit( $height ) ) { - $style_at = ' style="min-height:' . esc_attr( $height ) . 'px"'; - } $data_dims = ''; if ( $width !== '' ) { $data_dims .= ' data-width="' . esc_attr( $width ) . '"'; diff --git a/gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.mo b/gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.mo deleted file mode 100644 index 1787fd1929ad66cf56cf4ad0689212a5b6811f5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3230 zcmeH|O>7%Q6vw9!z6>p*w17~d51~r7!a7di5N!w|iJjCUAy#as2vtI3@7SJtJ!{R* zI@IFEg)34kAr1wVoVdUhsTD#N5?78O!~w27A#PmwKd+OxrEuYzmF?fo*PHkL@6Gtv z(=*ovo(uS%!?$>XTSrg$fDot9?15*%55O0}kHIIvuP5!>;InA|0zL=+2|fj$d{Brd z!Si4SoC7ag_&it#dA~l$c0K|h1FwPX z-wlxCxefBVpTRls4)`>9?xA$w0?2W!gD1i2q+fzJ(B1=2gU>vSIbaUNNA&Tt!sFm4 z(CizKb=r9})k%Wv#{gve*C*|pAp89t$U6N5vVVVotkVpFV4co@9q>Fjjt^v=u7Rx6 zmmur(1IRkv0a+))Vz!qBStlRl{pujw>4BIku7d2}hal^86XbQ@f~?bzAnSAji+JC& zAjdHavQCSW{&kRbx(u>Te}U`ZDNKeWq7Jf7mwEApn64-{bQH=!88J&mtxW8wqs=gB zjc&Ekxe|toO4{t{Fx2hDppW)+psY<=JZu_TIc1IPDY2S37a6)34V3liqBa<4+r$Jd zX&d(r*VOxNy8mAn_;fUNErLzsXf=$QU1h~u61%8JYt^bKRyTIHy>4V$k?koOfM zH^hB5?g~FIiV_o47($Eb zcZ&N;H#;zoUN{*yJBb^5^_@)$R7?j##nYq8cEiy=6l&jZ&gfP{*&aOOtw@{H%}|4s1Q_H$GH zz9<>jV%3Z&*{(7M-o!l!&ufZNPiiw)X-O=)H{(l$$80w>rB8b*d!w82)VH8zC*@uuN#2d}k$= z=EbhEe1f!N>4$r&*%gVN(1X0UuqVmX_aoU z<#*YbFMj*<^VGk8)EsP0)!kItA!;r?u5FZ`sMzR=YC5kRcZ_O&{V9sOxd|D_hyyg|= z@u5P&FBE1Acrel1Q3K7}{^z_+89T3LrHN6Q5iY4s-jBAiAH9A*7v9L=JhT&}!K*3R z^JxP|QkuhFA6a{^Sjudbw@OEWBhbtwc&~P~54X9b=lUVe$`Um@xIvU#uGiMR#iM!b z70#JgGR-JJ27Ov=XqTykiIt(Zj$1AE$@Is~czI!o(%0pzp_i6vKDU&4$J;=m*)*~( aX%ZP`jxYJ+OaAzh$N#!LzU2S+CI2^mW8fD6 diff --git a/gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.po b/gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.po deleted file mode 100644 index b480957..0000000 --- a/gdpr-content-blocker/languages/gdpr-content-blocker-de_DE.po +++ /dev/null @@ -1,125 +0,0 @@ -# Content Blocker – German (de_DE) -# Copyright (C) 2024 Lucas Orth -# This file is distributed under the same license as the Content Blocker plugin. -msgid "" -msgstr "" -"Project-Id-Version: Content Blocker 1.0.0\n" -"Report-Msgid-Bugs-To: privat@lucas-orth.de\n" -"POT-Creation-Date: 2024-01-01 00:00+0000\n" -"PO-Revision-Date: 2024-01-01 00:00+0000\n" -"Last-Translator: Lucas Orth \n" -"Language-Team: German\n" -"Language: de_DE\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Manual\n" - -msgid "Content Blocker" -msgstr "Content Blocker" - -msgid "DSGVO-konformer Consent-Blocker für externe iframes. Lädt Drittinhalte erst nach aktiver Einwilligung." -msgstr "DSGVO-konformer Consent-Blocker für externe iframes. Lädt Drittinhalte erst nach aktiver Einwilligung." - -msgid "Keine Berechtigung." -msgstr "Keine Berechtigung." - -msgid "Einstellungen gespeichert." -msgstr "Einstellungen gespeichert." - -msgid "Dienste" -msgstr "Dienste" - -msgid "Darstellung" -msgstr "Darstellung" - -msgid "+ Dienst hinzufügen" -msgstr "+ Dienst hinzufügen" - -msgid "Dienste speichern" -msgstr "Dienste speichern" - -msgid "Darstellung speichern" -msgstr "Darstellung speichern" - -msgid "Neuer Dienst" -msgstr "Neuer Dienst" - -msgid "ID (Slug, intern)" -msgstr "ID (Slug, intern)" - -msgid "Anbietername" -msgstr "Anbietername" - -msgid "Erkennungsmuster (Domain/Pfad)" -msgstr "Erkennungsmuster (Domain/Pfad)" - -msgid "Empfänger (inkl. Land)" -msgstr "Empfänger (inkl. Land)" - -msgid "Datenschutz-URL des Anbieters" -msgstr "Datenschutz-URL des Anbieters" - -msgid "Verarbeitungszweck" -msgstr "Verarbeitungszweck" - -msgid "Individueller Platzhaltertext (leer = Standard)" -msgstr "Individueller Platzhaltertext (leer = Standard)" - -msgid "Datenübermittlung in Drittland (außerhalb EU/EWR)" -msgstr "Datenübermittlung in Drittland (außerhalb EU/EWR)" - -msgid "Setzt Cookies" -msgstr "Setzt Cookies" - -msgid "Lädt externe Skripte" -msgstr "Lädt externe Skripte" - -msgid "Entfernen" -msgstr "Entfernen" - -msgid "Textfarbe Platzhalter" -msgstr "Textfarbe Platzhalter" - -msgid "Hintergrundfarbe Platzhalter" -msgstr "Hintergrundfarbe Platzhalter" - -msgid "Button: Hintergrundfarbe" -msgstr "Button: Hintergrundfarbe" - -msgid "Button: Textfarbe" -msgstr "Button: Textfarbe" - -msgid "Button Hover: Hintergrundfarbe" -msgstr "Button Hover: Hintergrundfarbe" - -msgid "Button Hover: Textfarbe" -msgstr "Button Hover: Textfarbe" - -msgid "Custom CSS" -msgstr "Custom CSS" - -msgid "Wird nach den CSS-Variablen eingebunden und kann diese überschreiben." -msgstr "Wird nach den CSS-Variablen eingebunden und kann diese überschreiben." - -msgid "Um diesen Inhalt von %s zu laden, ist Ihre Einwilligung erforderlich. Dabei werden personenbezogene Daten (z. B. Ihre IP-Adresse) an den Anbieter übertragen." -msgstr "Um diesen Inhalt von %s zu laden, ist Ihre Einwilligung erforderlich. Dabei werden personenbezogene Daten (z. B. Ihre IP-Adresse) an den Anbieter übertragen." - -msgid "⚠ Datenübermittlung in ein Drittland außerhalb der EU/des EWR" -msgstr "⚠ Datenübermittlung in ein Drittland außerhalb der EU/des EWR" - -msgid "Datenschutzerklärung des Anbieters" -msgstr "Datenschutzerklärung des Anbieters" - -msgid "Empfänger:" -msgstr "Empfänger:" - -msgid "Zweck:" -msgstr "Zweck:" - -msgid "%s jetzt laden" -msgstr "%s jetzt laden" - -msgid "Alle Einwilligungen widerrufen" -msgstr "Alle Einwilligungen widerrufen" diff --git a/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo b/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo index 44782da4663f3a29891a235580e39431aeb5aceb..eb794f2e03292f0d2686fbb82dcd76de3effb8b5 100644 GIT binary patch delta 1797 zcmXZbduYvJ9LMqRu!}RBW1C%UV=iOtc4o-r7AqwbDOt2uGuNVZYSHxD##a8+W}BHs z3WZq?nNq@XDTFALm}u5q+aE5ocz^tUwf1_R-+6w|^ZkCG@9#l*PkGm>FlUjOmByI; z!sD2VEwN^P4B-Uq!AN|AJr#CGh!6Lu#(g=+>7gdq_r~{v)_UZThhH;#4KNx5u-z2j&n2L&c2dcz-Q3oDE1=NBicpT^8 zPh5bx8QvA3)(3GL)?pS7puVmI8Y+MRjCB~4F{r~mNGvvpT%X19Ey-+DNsCc;zX4U+ za?jnUyWEEq&$>{7KSU++8Yzx_^5(v&ZlzMtDd2}f28FlM5{kv;7WW@A4#;CLE?p|zt*e$$)ZL%sJIbu~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