var _msgokConfig = {
"recipient":"mujucet",
"payload":"%7B%22runId%22%3A%22abc%3Amujscenar%22%7D",
"src":"templates/mujucet",
"type":"popup",
"classes": ["msgokWidget--fix-to-right", "msgokWidget--size-text"],
"title": "Online pomoc"
};
var e = document.createElement("script");
e.src = "https://cdn.msgok.net/client/v10.js";
e.async = true;
e.defer = true;
e.addEventListener("load",function(){
const w = window.msgokWidget.create("#msgokpreview", _msgokConfig);
w.show();
const linksWithPayload = document.querySelectorAll('a[data-msgokpayload]');
if (linksWithPayload.length > 0) {
linksWithPayload.forEach(link => {
link.addEventListener('click', function(event) {
event.preventDefault();
const payload = link.getAttribute('data-msgokpayload');
w.modifyPayload(payload);
});
});
}
});
document.getElementsByTagName("head")[0].appendChild(e);