(function waitMdxFlashBlock(){
var block = document.querySelector(".mdx-flash-block");
if(!block){
setTimeout(waitMdxFlashBlock, 500);
return;
}
console.log("MDX Flash Block bulundu");
var css = document.createElement("style");
css.innerHTML = `
.mdx-flash-block .discountIcon,
.mdx-flash-block .discountIcon_s1,
.mdx-flash-block .discountIcon_s2,
.mdx-flash-block .discountIconDetail,
.mdx-flash-block .owl-dots,
.mdx-flash-block .owl-dot,
.mdx-flash-block button.owl-dot,
.mdx-flash-block .owl-nav,
.mdx-flash-block .owl-prev,
.mdx-flash-block .owl-next{
display:none!important;
visibility:hidden!important;
opacity:0!important;
pointer-events:none!important;
}
.mdx-flash-block .mdx-flash-ready{
position:relative!important;
overflow:hidden!important;
}
.mdx-flash-block .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-size:8px!important;
font-weight:900!important;
line-height:1.05!important;
font-family:"Source Sans 3",sans-serif!important;
pointer-events:none!important;
}
.mdx-flash-block .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;
}
.mdx-flash-block .flash-sale-badge{
width:100%!important;
height:30px!important;
display:flex!important;
background:#ffe6ec!important;
}
.mdx-flash-block .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;
}
.mdx-flash-block .fs-icon{
width:14px!important;
height:14px!important;
min-width:14px!important;
margin-right:6px!important;
}
.mdx-flash-block .fs-title{
color:#fff!important;
font-size:16px!important;
font-weight:700!important;
line-height:30px!important;
white-space:nowrap!important;
}
.mdx-flash-block .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;
}
.mdx-flash-block .seperator{
padding:0 4px!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...........