zegar zegar
Start promocji za: 00:00:00

Kup produkt w nowej, niższej cenie!

Grafika pokazująca kroki, które trzeba przjść by zakupić produkt w promocji Grafika pokazująca kroki, które trzeba przjść by zakupić produkt w promocji

* Promocja trwa do wyczerpania asortymentu, nie łączy się z innymi promocjami.

[script]/* Funkcja aktualizująca timer */function updateTimer() { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var endHour = 19; var startHour = 6; /* Sprawdzenie czy czas jest po 19:00 lub przed 6:00 */ if ( hours >= endHour || hours < startHour ) { /* Ukrycie elementu po godzinie 19:00 i przed 6:00 */ document.getElementById( "night_sales_timer" ).style.display = "none"; document.getElementById('night_sales_steps').style.display = ""; } else { /* Pokazanie elementu i odliczanie do 19:00 */ document.getElementById( "night_sales_timer" ).style.display = ""; document.getElementById('night_sales_steps').style.display = "none"; /* Obliczanie różnicy czasowej do godziny 19:00 */ var endTime = new Date( now.getFullYear(), now.getMonth(), now.getDate(), endHour, 0, 0 ); var timeDiff = endTime - now; if (timeDiff < 0) { /* Jeśli różnica jest ujemna, oznacza to, że jesteśmy po 19:00 */ /* Ustawiamy odliczanie do 19:00 następnego dnia */ endTime = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 1, endHour, 0, 0 ); timeDiff = endTime - now; } /* Obliczanie pozostałych godzin, minut i sekund */ var remainingHours = Math.floor(timeDiff / (1000 * 60 * 60)); var remainingMinutes = Math.floor((timeDiff / (1000 * 60)) % 60); var remainingSeconds = Math.floor((timeDiff / 1000) % 60); /* Dodawanie zer wiodących, jeśli liczby są jednocyfrowe */ var remainingHoursPadded = remainingHours.toString().padStart(2, '0'); var remainingMinutesPadded = remainingMinutes.toString().padStart(2, '0'); var remainingSecondsPadded = remainingSeconds.toString().padStart(2, '0'); /* Wyświetlanie pozostałego czasu */ var timerText = document.querySelector('.timer-text'); timerText.textContent = remainingHoursPadded + ':' + remainingMinutesPadded + ':' + remainingSecondsPadded; }}setInterval(updateTimer, 1000);/* Podmiana linków */function updateImagesAndLinks() { const now = new Date(); const dayOfMonth = now.getDate(); const currentHour = now.getHours(); const isMobile = window.innerWidth <= 427; /* Pobranie danych dla aktualnego dnia */ const dailyData = dailyImages[dayOfMonth]; if (!dailyData) { console.error('No data for current day'); return; } /* Elementy do aktualizacji */ const firstImageDesktop = document.getElementById('firstImageDesktop'); const secondImageDesktop = document.getElementById('secondImageDesktop'); const firstImageMobile = document.getElementById('firstImageMobile'); const secondImageMobile = document.getElementById('secondImageMobile'); const secondImageLinkDesktop = document.getElementById( "secondImageLinkDesktop" ); const secondImageLinkMobile = document.getElementById( "secondImageLinkMobile" ); /* Logika wyboru odpowiedniego obrazu i linku oraz ukrywania/pokazywania */ if (currentHour >= 6 && currentHour < 19) { /* Od 6:00 do 18:59 */ if (isMobile) { firstImageMobile.src = dailyData.mobileImgDaySrc; firstImageMobile.style.display = "block"; secondImageLinkMobile.style.display = "none"; firstImageDesktop.style.display = "none"; secondImageLinkDesktop.style.display = "none"; } else { firstImageDesktop.src = dailyData.desktopImgDaySrc; firstImageDesktop.style.display = "block"; secondImageLinkDesktop.style.display = "none"; firstImageMobile.style.display = "none"; secondImageLinkMobile.style.display = "none"; } } else { /* Od 19:00 do 5:59 */ if (isMobile) { secondImageMobile.src = dailyData.mobileImgNightSrc; secondImageLinkMobile.href = dailyData.nightLinkHref; secondImageLinkMobile.style.display = "block"; firstImageMobile.style.display = "none"; secondImageLinkDesktop.style.display = "none"; firstImageDesktop.style.display = "none"; } else { secondImageDesktop.src = dailyData.desktopImgNightSrc; secondImageLinkDesktop.href = dailyData.nightLinkHref; secondImageLinkDesktop.style.display = "block"; firstImageDesktop.style.display = "none"; secondImageLinkMobile.style.display = "none"; firstImageMobile.style.display = "none"; } }}updateImagesAndLinks();function scheduleRefresh() { const now = new Date(); let nextRefresh = new Date(); if ( now.getHours() >= 19 || (now.getHours() === 18 && now.getMinutes() >= 59 && now.getSeconds() >= 3) ) { /* Jeśli jest później niż 19:00:03, ustaw odświeżenie na 6:00:03 następnego dnia */ nextRefresh.setDate(now.getDate() + 1); nextRefresh.setHours(6, 0, 3, 0); } else if ( now.getHours() < 6 || (now.getHours() === 6 && now.getSeconds() < 3) ) { /* Jeśli jest wcześniej niż 6:00:03, ustaw odświeżenie na 6:00:03 tego samego dnia */ nextRefresh.setHours(6, 0, 3, 0); } else { /* W przeciwnym razie ustaw odświeżenie na 19:00:03 tego samego dnia */ nextRefresh.setHours(19, 0, 3, 0); } const millisTillRefresh = nextRefresh.getTime() - now.getTime(); setTimeout(function () { window.location.reload(true); }, millisTillRefresh);}scheduleRefresh();let lastWindowWidth = window.innerWidth;window.addEventListener('resize', () => { const currentWindowWidth = window.innerWidth; if ((lastWindowWidth <= 428 && currentWindowWidth > 428) || (lastWindowWidth > 428 && currentWindowWidth <= 428)) { window.location.reload(); } lastWindowWidth = currentWindowWidth;});[/script]
Zapisz się do newslettera

Proponowane kategorie

    Proponowane produkty