This commit is contained in:
2025-11-13 11:24:23 +01:00
parent 35e6b82422
commit 49071af479
5 changed files with 66 additions and 18 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4317,9 +4317,9 @@ form {
.scroll-brn-box {
position: fixed;
bottom: 40px;
right: 40px;
z-index: 100000000000;
bottom: 38px;
right: 100px;
z-index: 10000000;
opacity: 0;
visibility: hidden;
transition: all 250ms ease-in-out;
@@ -4330,8 +4330,8 @@ form {
}
a {
width: 50px;
height: 50px;
width: 56px;
height: 56px;
background: #e79332;
border-radius: 100%;
display: flex;

View File

@@ -447,3 +447,50 @@ if (isEditing()) return;
window.addEventListener('popstate', onNav);
})();
})();
$(document).ready(function () {
function toggleChatWidget(isOpen) {
var $widget = $('div[data-testid="widgetButtonFrame"]');
var $scrollBox = $('.scroll-brn-box')
if ($widget.length) {
if (isOpen) {
$widget.hide();
$scrollBox.hide();
} else {
$widget.show();
$scrollBox.show();
}
}
}
function checkCartState() {
var $cart = $('.elementor-cart__container');
var isOpen = $cart.hasClass('elementor-cart--shown');
toggleChatWidget(isOpen);
}
$('a[href*="koszyk"][class*="elementor-button"]').on('click', function () {
setTimeout(checkCartState, 300);
});
$(document).on('click', '.elementor-cart__close-button', function () {
setTimeout(checkCartState, 300);
});
$(document).on('click', '.elementor-cart__container.elementor-lightbox.elementor-cart--shown', function (e) {
if (e.target === this) {
setTimeout(checkCartState, 300);
}
});
const cartContainer = document.querySelector('.elementor-cart__container');
if (cartContainer) {
const observer = new MutationObserver(() => checkCartState());
observer.observe(cartContainer, { attributes: true, attributeFilter: ['class'] });
}
checkCartState();
});

View File

@@ -94,18 +94,19 @@
var _smartsupp = _smartsupp || {};
_smartsupp.key = '0d334d3fee8a20124724fb0e40e42cb00d98a537';
_smartsupp.color = '#e78c32';
_smartsupp.offsetX = 100; // move along the X axis by 100 pixels
_smartsupp.offsetX = 40; // move along the X axis by 100 pixels
_smartsupp.offsetY = 38;
window.smartsupp || (function(d) {
var s, c, o = smartsupp = function() { o._.push(arguments) };
o._ = [];
s = d.getElementsByTagName('script')[0];
c = d.createElement('script');
c.type = 'text/javascript';
c.charset = 'utf-8';
c.async = true;
c.src = 'https://www.smartsuppchat.com/loader.js?';
s.parentNode.insertBefore(c, s);
window.smartsupp||(function(d) {
var s,c,o=smartsupp=function(){ o._.push(arguments) };
o._=[];
s=d.getElementsByTagName('script')[0];
c=d.createElement('script');
c.type='text/javascript';
c.charset='utf-8';
c.async=true;
c.src='https://www.smartsuppchat.com/loader.js?';
s.parentNode.insertBefore(c,s);
})(document);
</script>
{/literal}