(function waitFlashTitle(){
var title = Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,div,span,strong")).find(function(el){
return el.textContent.trim().toLowerCase() === "flaş ürünler";
});
if(!title){
setTimeout(waitFlashTitle, 500);
return;
}
console.log("Flaş Ürünler bloğu bulundu");
var block = title.closest("section, .homeBlock, .blok, .Block, .product-list, .ProductList, div");
if(!block) return;
var css = document.createElement("style");
css.innerHTML = `
.mdx-flash-ready{position:relative!important;overflow:hidden!important}
.mdx-flash-top-badge{
position:absolute!important;top:10px!important;left:10px!important;width:58px!important;height:58px!important;
border-radius:50%!important;background:linear-gradient(135deg,#ff6b00,#7b2cff)!important;color:#fff!important;
z-index:9998!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;
font-family:"Source Sans 3",sans-serif!important;font-size:8px!important;font-weight:900!important;line-height:1.05!important;
pointer-events:none!important;
}
.image-overlay-bottom{
position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:30px!important;display:flex!important;
z-index:9999!important;pointer-events:none!important;font-family:"Source Sans 3",sans-serif!important;
}
.flash-sale-badge{width:100%!important;height:30px!important;display:flex!important;background:#ffe6ec!important}
.badge-info{width:68%!important;height:30px!important;display:flex!important;align-items:center!important;background:linear-gradient(90deg,#ff6b00,#ff4f67)!important;padding:0 10px!important;gap:6px!important;box-sizing:border-box!important}
.fs-icon{width:14px!important;height:14px!important;min-width:14px!important;margin-right:6px!important}
.fs-title{color:#fff!important;font-size:16px!important;font-weight:700!important;line-height:30px!important;white-space:nowrap!important}
.fs-countdown{flex:1!important;height:30px!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;background:#ffe6ec!important;padding:0 12px!important;color:#111!important;font-size:16px!important;font-weight:900!important;white-space:nowrap!important}
.seperator{padding:0 4px!important}
.owl-dots,.owl-dot,button.owl-dot,.owl-nav,.owl-prev,.owl-next,
.discountIcon,.discountIcon_s1,.discountIcon_s2,.discountIconDetail{
display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
`;
document.head.appendChild(css);
function pad(n){ return String(n).padStart(2,"0"); }
function getTime(){
var end = new Date();
end.setHours(23,59,59,999);
var diff = Math.max(0, end.getTime() - Date.now());
return {
h: pad(Math.floor(diff / 3600000)),
m: pad(Math.floor((diff % 3600000) / 60000)),
s: pad(Math.floor((diff % 60000) / 1000))
};
}
function apply(){
block.querySelectorAll("img").forEach(function(img){
if(img.classList.contains("fs-icon")) return;
if(img.width < 120 || img.height < 120) return;
var wrap = img.closest(".productImage,.ProductImage,.product-image,.resim,.image,a") || img.parentElement;
if(!wrap || wrap.classList.contains("mdx-flash-ready")) return;
wrap.classList.add("mdx-flash-ready");
var t = getTime();
wrap.insertAdjacentHTML("beforeend",
'24 SAATTE
⚡ FLAŞ
ÜRÜNLER
' +
'' +
'
' +
'
' +
'

' +
'
Flaş Ürün' +
'
' +
'
' +
''+t.h+'' +
':' +
''+t.m+'' +
':' +
''+t.s+'' +
'
' +
'
' +
'
'
);
});
}
function update(){
var t = getTime();
block.querySelectorAll(".image-overlay-bottom").forEach(function(el){
el.querySelector(".countdown-hours").textContent = t.h;
el.querySelector(".countdown-minutes").textContent = t.m;
el.querySelector(".countdown-seconds").textContent = t.s;
});
}
apply();
update();
setInterval(function(){
apply();
update();
},1000);
})();
kullanıcılar beğeniyor...........