document.addEventListener('DOMContentLoaded', function() { const outOfStockElements = document.querySelectorAll('.item .item-area.outofstock'); outOfStockElements.forEach(element => { const computedStyle = window.getComputedStyle(element); if (computedStyle.getPropertyValue('filter') === 'grayscale(1)') { element.style.filter = 'none'; } }); const simpleProductButtons = document.querySelectorAll('.item .item-area.outofstock .add-to-cart-wrap'); simpleProductButtons.forEach(button => { button.parentNode.innerHTML = ''; }); const simpleProductButtonsCall = document.querySelectorAll('.item .item-area.outofstock .add-to-links'); simpleProductButtonsCall.forEach(button => { button.innerHTML += '
  • '; }); const style = document.createElement('style'); style.innerHTML = ` .item.outofstock, .item .item-area.outofstock { filter: none !important; } .btn-whatsapp { background: green; border-radius: 8px; } .btn-call-shkrn { background: #492bef; border-radius: 8px; } .btn-whatsapp > svg, .item .item-area .actions .btn-call-shkrn svg { fill: #fff; stroke: #fff; } .product-type-1 .item .item-area:hover .actions { padding: 5px !important; bottom: 0px !important; height: fit-content !important; } .item .item-area.outofstock span.price { display: none !important; } .elm_txt_l.out_of_stock { display: none; } `; document.head.appendChild(style); jquery(function () { jquery('.btn-whatsapp').tooltip() }); });