ABCG Agenda Embed
WordPress plugin: auto-height iframe embeds for the ABCG agenda
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/anirudhatalmale6-alt/abcg-agenda-embed/archive/refs/heads/main.zipReadme
ABCG Agenda Embed
Makes the agenda iframes on abcg.ch size themselves to their content, so the inner right-hand scrollbar disappears and nothing is cut off.
The problem
The two agenda boxes are iframes served from admin.abcg.ch, a different host
than abcg.ch. A browser will not let a page measure the content of an iframe
from another host, so the height had to be hard-coded:
- Home page — no height at all, so the browser fell back to a default that is too short on phones.
/agenda/— fixed at1300px, while the real content is roughly2100pxon desktop and2900pxon a phone. Everything past 1300px sat behind the scrollbar.
The content height also changes with screen width, so no fixed value can be correct on every device.
How it works
The plugin serves the two agenda pages from this domain (/abcg-embed/next/
and /abcg-embed/list/). Because the iframe is then same-origin, its real
height can be read and reported to the page, which resizes the frame to match.
On the way through, the plugin also:
- keeps the ASP.NET postback working (the "Lire plus ..." detail box), including ViewState and session cookies, so the frame re-sizes when the box opens and closes;
- lifts the fixed
height: 80pxon the home page cards, which was slicing long event titles in half; - stacks the agenda date above the title below 780px, so rows stop spilling sideways on a phone.
Only those two pages can be requested — the endpoint is not a general proxy.
Install
- WordPress admin → Plugins → Add New → Upload Plugin.
- Upload
abcg-agenda-embed.zip, then Activate. - Edit the two pages and replace the existing `