Fix intro after beacon upgrade
[MAILPOET-2351]
This commit is contained in:
committed by
Jack Kitterhing
parent
6584d84dbb
commit
7e112cbbfc
@ -395,10 +395,18 @@
|
|||||||
<% block after_javascript %>
|
<% block after_javascript %>
|
||||||
<% if settings.show_intro %>
|
<% if settings.show_intro %>
|
||||||
<script>
|
<script>
|
||||||
HS.beacon.ready(function () {
|
const initIntro = () => {
|
||||||
document.querySelector('#hs-beacon iframe').classList.add('mailpoet-chat');
|
const beacon = document.querySelector('#beacon-container iframe');
|
||||||
|
if (beacon) {
|
||||||
|
beacon.classList.add('mailpoet-chat');
|
||||||
MailPoet.showIntro();
|
MailPoet.showIntro();
|
||||||
});
|
} else {
|
||||||
|
setTimeout(initIntro, 200);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
document.addEventListener('DOMContentLoaded', function(){
|
||||||
|
initIntro();
|
||||||
|
}, false);
|
||||||
</script>
|
</script>
|
||||||
<% endif %>
|
<% endif %>
|
||||||
<% endblock %>
|
<% endblock %>
|
||||||
|
Reference in New Issue
Block a user