Hi FinancialIntelligence ,
Since version 2.2, we've actually improved our Buttonizer API and removed the buttonizerInitialized() function.
Now, if you want to replicate the old code above, we can make it a lot smaller.
<script>
  let overlay = document.createElement("div");
  overlay.style.id = "cover";
  overlay.style.position = "fixed";
  overlay.style.top = 0;
  overlay.style.left = 0;
  overlay.style.background = "#00000099";
  overlay.style.zIndex = 5;
  overlay.style.width = "100%";
  overlay.style.height = "100%";
  overlay.style.display = "block";
  overlay.style.opacity = 2;
  
  window.addEventListener("buttonizer_group_opened", (obj) => {
    if(obj.detail.open) {
      document.body.appendChild(overlay);
    }
    else if(!obj.detail.open && document.body.contains(overlay)) {
      document.body.removeChild(overlay);
    }
  })
</script>
If you want to know what you else can you do with the new Buttonizer API, we have a knowledge base topic here:
Buttonizer JavaScript API
Let me know if this works for you! π