badges: post host return URL to the embedded frame

This commit is contained in:
shum
2026-09-11 15:34:35 +00:00
parent d032d18cb2
commit 5902ed02b1
+3
View File
@@ -192,6 +192,9 @@ templateEngineOverride: njk
if (e.data.type === "simplex-embed-ready") {
post({ type: "simplex-theme", theme: siteTheme() });
postColors();
// A card confirm redirects the top window to this URL; the frame hands it to Stripe
// so the redirect returns to the site, not to the frame's own standalone page.
post({ type: "simplex-return-url", url: location.origin + location.pathname });
}
// The buyer used the theme switch inside the frame; keep the site in step.
if (e.data.type === "simplex-theme") { applySiteTheme(e.data.theme); postColors(); }