From 7825dd64ca76d964fe141d1bc2d901daecc24f56 Mon Sep 17 00:00:00 2001 From: Jai A Date: Thu, 31 Oct 2024 15:14:41 -0700 Subject: [PATCH] Sync app consent with inmobi consent --- apps/frontend/src/public/promo-frame.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/frontend/src/public/promo-frame.html b/apps/frontend/src/public/promo-frame.html index 5bac9e3c0..a0d1c2ee8 100644 --- a/apps/frontend/src/public/promo-frame.html +++ b/apps/frontend/src/public/promo-frame.html @@ -136,6 +136,17 @@ origin: "https://modrinth.com", }); }); + + function syncAgreeState() { + const primaryButton = document.querySelector('[mode="primary"]'); + + if (primaryButton && primaryButton.textContent && primaryButton.textContent.includes("AGREE")) { + primaryButton.click(); + } else { + setTimeout(syncAgreeState, 100); + } + } + syncAgreeState();