const observer = new MutationObserver(function (mutations) {
mutations.forEach((mutation) => {
mutation.addedNodes.forEach((node) => {
if (node.nodeType === 1) {
if (node.classList.contains("js-menu__open")) {
node.textContent = "Hızlı Ekle";
}
// Handle child nodes if a container is added
const quickAddElements = node.querySelectorAll?.(".js-menu__open");
quickAddElements?.forEach((element) => {
if (element.textContent.trim() === "Quick add") {
element.textContent = "Hızlı Ekle";
}
});
// Check and translate "ADD TO CART" button
if (
node.classList.contains("QeAddtocart-btn") &&
node.tagName === "BUTTON"
) {
if (node.textContent.trim() === "ADD TO CART") {
node.textContent = "SEPETE EKLE";
}
}
// Check and translate "GO TO CART" link
if (
node.classList.contains("QeGOtocart-link") &&
node.tagName === "A"
) {
if (node.textContent.trim() === "GO TO CART") {
node.textContent = "SEPETE GİT";
}
}
// Check and translate "Show more" and "Show less" links
if (node.classList.contains("more") && node.tagName === "A") {
if (node.textContent.trim() === "Show more") {
node.textContent = "Daha fazlasını göster";
}
}
if (node.classList.contains("less") && node.tagName === "A") {
if (node.textContent.trim() === "Show less") {
node.textContent = "Daha az göster";
}
}
// Handle cases where these elements might be within a newly added container
const addToCartButton = node.querySelector?.(".QeAddtocart-btn");
if (addToCartButton && addToCartButton.tagName === "BUTTON") {
if (addToCartButton.textContent.trim() === "ADD TO CART") {
addToCartButton.textContent = "SEPETE EKLE";
}
}
const goToCartLink = node.querySelector?.(".QeGOtocart-link");
if (goToCartLink && goToCartLink.tagName === "A") {
if (goToCartLink.textContent.trim() === "GO TO CART") {
goToCartLink.textContent = "SEPETE GİT";
}
}
const showMoreLink = node.querySelector?.(".more");
if (showMoreLink && showMoreLink.tagName === "A") {
if (showMoreLink.textContent.trim() === "Show more") {
showMoreLink.textContent = "Daha fazlasını göster";
}
}
const showLessLink = node.querySelector?.(".less");
if (showLessLink && showLessLink.tagName === "A") {
if (showLessLink.textContent.trim() === "Show less") {
showLessLink.textContent = "Daha az göster";
}
}
}
});
});
});
// Event delegation for click handling
document.addEventListener("click", function (event) {
const target = event.target;
// Handle "Show more"
if (target && target.classList.contains("more")) {
target.textContent = "Daha fazlasını göster";
}
// Handle "Show less"
if (target && target.classList.contains("less")) {
target.textContent = "Daha az göster";
}
});
// Observe the body for child additions
observer.observe(document.body, { childList: true, subtree: true });
.Qe_Recently-view .box-slider .product_title {text-align:left; padding:0 0px; font-weight:300; letter-spacing: 0; text-transform: none; margin-bottom:0px; margin-top:5px; font-size:13px; color:#1a1a1a; text-transform: initial; font_family:roboto}
.Qe_Recently-view .box-slider {text-align:left; position:relative; background: #fff!important; width:100%;}
.product_price {color:#ed4332;}
.recently-viewed-ttl{font-size:28px;}
.Qe_Recently-view{padding-left:0px; padding-right:0px; margin:0 auto;}
.recently_sliders .box-outer{margin-right: 0; padding: 0 15px;}
.Qe_Recently-view .recently-viewed-ttl{font-size: 25px; margin:0 0 42px 0px; font-weight: 500;}
.Qe_Recently-view .box-slider .product_title{margin-top:20px; margin-bottom:10px;}
.recently_sliders .box-outer .product_price{font-size:11px; font-weight:400;}
.recently_sliders .box-outer .product_price s{color:#ed4332; padding:0 4px 0 0px;}
.Qe_Recently-view .recently_sliders .slick-prev{left:0; background: #f2f5f7; color: #999; border-radius:50%; -webkit-transition: all .35s ease; -o-transition: all .35s ease; transition: all .35s ease; width: 45px; height: 45px; }
.Qe_Recently-view .recently_sliders .slick-prev:before{font-family: var(--vela-font-icon); content: "\f104"; font-size: 18px;}
.Qe_Recently-view .slick-slider:hover .slick-arrow.slick-prev{left:0;}
.Qe_Recently-view .recently_sliders .slick-prev:hover{background:#1a2b3c; color:#fff;}
.Qe_Recently-view .recently_sliders .slick-prev:hover:before{color:#fff;}
.Qe_Recently-view .recently_sliders .slick-next{right:0; background: #f2f5f7; color: #999; border-radius:50%; -webkit-transition: all .35s ease; -o-transition: all .35s ease; transition: all .35s ease; width: 45px; height: 45px;}
.Qe_Recently-view .recently_sliders .slick-next:before{font-family: var(--vela-font-icon); content: "\f105"; font-size: 18px;}
.Qe_Recently-view .slick-slider:hover .slick-arrow.slick-next{right:0;}
.Qe_Recently-view .recently_sliders .slick-next:hover{background:#1a2b3c; color:#fff;}
.Qe_Recently-view .recently_sliders .slick-next:hover:before{color:#fff;}
.Qe_Recently-view .slick-slider .slick-arrow{opacity:0;}
.Qe_Recently-view .slick-slider:hover .slick-arrow{opacity:inherit;}
@media (min-width: 768px) {
.Qe_Recently-view {max-width:760px;}
}
@media (min-width: 992px) {
.Qe_Recently-view {max-width:990px;}
}
@media (min-width: 1220px) {
.Qe_Recently-view {max-width:1220px;}
}
@media (min-width: 1410px) {
.Qe_Recently-view {max-width:1410px;}
}