UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

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