A self-contained iframe carrying the transparency notice. It can sit in the corner of the creative and open on hover, or run above it as an always-visible label strip.
iframe —
Loading a published transparency notice.
Paste this around your creative. It follows the placement selected above.
<div style="position: relative">
<!-- your creative goes here -->
<iframe id="polads-badge"
src="https://polads.eu/badge/ABC12?w=300&h=250"
title="Political advertising transparency notice"
scrolling="no"
style="position: absolute; top: 8px; right: 8px;
width: 32px; height: 32px; border: 0; background: transparent;
transition: width .22s cubic-bezier(.2,.7,.25,1),
height .22s cubic-bezier(.2,.7,.25,1)"></iframe>
</div>
<script>
window.addEventListener("message", function (e) {
if (e.origin !== "https://polads.eu") return;
var f = document.getElementById("polads-badge");
if (!f || e.source !== f.contentWindow) return;
if (!e.data || e.data.polads !== "size") return;
f.style.width = e.data.w + "px";
f.style.height = e.data.h + "px";
});
</script>An iframe is an opaque rectangle: whatever it covers stops receiving clicks. Sized to the open panel it would swallow most of a 300 by 250 slot. So the frame ships at badge size and posts a size message to the parent when it opens and closes.
Tapping the corner badge does open it, but a tap that reveals rather than navigates is a weak affordance on touch. When the device reports no hover, the label strip is the better choice, because the notice is on screen from the start.
It only ever asks for height, and it is already legible at its starting height. Without the resize listener the text may clip at narrow widths, but nothing becomes unreachable, unlike the corner badge, which cannot open at all.
The embed code ignores any message that did not come from the notice origin and from that exact frame. A page can host many iframes, and a resize handler that trusts every sender lets any of them resize the badge.
Tell the badge its slot size and it adapts. Under about 200 pixels of room the panel opens landscape, and on a slot that is both short and narrow it shrinks to the mark and links straight to the notice.
The frame draws with the system font stack and one inlined mark, so it paints with the ad rather than a beat later, and it cannot leak a font request to a third party.