unction shuffleArray
unction shuffleArray(array) { for (let i = array.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [array[i], array[j]] = [array[j], array[i]]; } } // Function to refresh the page every 250 seconds function refreshPage() { var refreshInterval = 250000; // Refresh every 250 seconds setInterval(function () { location.reload(); }, refreshInterval); } // Function to open the modal, show the iframe with the link, and switch after 20 seconds function executeLoop(modalId, iframeId, links) { shuffleArray(links); // Shuffle the links randomly let currentIndex = 0; // Keep track of the current index in the links array function openLink() { var link = links[currentIndex]; openModal(modalId); // Open the modal validateLink(link, function (isValid) { if (isValid) { document...
Comments
Post a Comment