copyright>
// Functionality to shuffle an array randomly
functionality shuffleArray(array)
for (let i = array.duration - one; i > 0; i--)
const j = Math.ground(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
// Perform to refresh the page at a hard and fast interval
perform refreshPage()
var refreshInterval = 250000;
setInterval(operate ()
spot.reload();
, refreshInterval);
// Function to carry out the website link loop
operate executeLoop()
var back links = [
'Your Link 1',
'Your Url two',
'Your Link 3',
'Your Url four',
'Your Connection 5',
'Your Hyperlink 6',
];
// Shuffle the array randomly
shuffleArray(inbound links);
var currentIndex = 0;
function openLink()
var url = one-way links[currentIndex];
// Display the website link during the modal
openModalWithLink(link);
var interval = Math.floor(Math.random() * (30000 - 20000 + 1) + 20000);
// Near the modal immediately after the required interval
setTimeout(functionality ()
closeModal();
// Transfer to the following url
currentIndex = (currentIndex + one) % inbound links.size;
// Simply call openLink all over again with the updated index
openLink();
, interval);
// Initial execution
openLink();
// Function to open up the modal which has a given hyperlink
function openModalWithLink(link)
document.getElementById('modalIframe').src = hyperlink;
// Explicitly load the iframe following setting the source
doc.getElementById('modalIframe').onload = purpose ()
doc.getElementById('myModal').type.Screen = 'block';
;
// Perform to shut the modal
purpose closeModal()
doc.getElementById('myModal').fashion.display = 'none';
// First execution
window.onload = operate check here ()
refreshPage(); // Start off the webpage refresh
executeLoop(); // Start off the website link loop
;
×
------------------------------------------------------------------------------------------
2nd Code: (Observe: Use various Gmail/web site for this code)