UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

19 lines (18 loc) 599 B
import { PAUSE_SCROLLING_CLASS as It } from "../../common/constants.js"; export function removeAllVisibleInAppMessages() { const o = document.querySelectorAll(".ab-iam-root"); for (let t = 0; t < o.length; t++) { const n = o[t]; if (n.id) { const o = n.id + "-css", t = document.getElementById(o); t && t.parentNode && t.parentNode.removeChild(t); } n.parentNode && n.parentNode.removeChild(n); } const t = document.getElementsByClassName(It); for (let o = 0; o < t.length; o++) { const n = t[o].classList; n.contains(It) && n.remove(It); } }