/* Add custom Js code below */ var ele = document.createElement("section") ele.setAttribute("id", "counter_sec"); document.querySelector("section.s-block.s-block--photos-slider:nth-of-type(1)").after(ele); document.getElementById("counter_sec").innerHTML = `
` // Create a new script element var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'; // Find the section with the selector .s-block.s-block--photos-slider var section = document.querySelector('.s-block.s-block--photos-slider'); // Insert the script after the section section.parentNode.insertBefore(script, section.nextSibling); function CountDownTimer() { left_days = document.getElementById("days"); left_hours = document.getElementById("hours"); left_minutes = document.getElementById("minutes"); left_seconds = document.getElementById("seconds"); } function showRemaining() { now = new Date(); // Calculate remaining time until Friday 11:59 PM let targetDate = new Date(now); targetDate.setDate(now.getDate() + (5 + (7 - now.getDay())) % 7); // Friday of this week targetDate.setHours(23, 59, 59, 0); // 11:59 PM let timeDiff = targetDate.getTime() - now.getTime(); if (timeDiff < 0) { // If current time is after Friday 11:59 PM, set the target to next week targetDate.setDate(targetDate.getDate() + 7); timeDiff = targetDate.getTime() - now.getTime(); } // Calculate days, hours, minutes, and seconds let days = Math.floor(timeDiff / (1000 * 60 * 60 * 24)); let hours = Math.floor((timeDiff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); left_days.innerHTML = days + "