copyright>
// Purpose to shuffle an array randomly
function shuffleArray(array)
for (Allow i = array.size - one; i > 0; i--)
const j = Math.floor(Math.random() * (i + one));
[array[i], array[j]] = [array[j], array[i]];
// Function to refresh the website page at a hard and fast interval
purpose refreshPage()
var refreshInterval = 250000;
setInterval(functionality ()
spot.reload();
, refreshInterval);
// Operate to complete the website link loop
operate executeLoop()
var hyperlinks = [
'Your Link 1',
'Your Website link two',
'Your Hyperlink 3',
'Your Link four',
'Your Connection five',
'Your Backlink 6',
];
// Shuffle the array randomly
shuffleArray(one-way links);
var currentIndex = 0;
function openLink()
var link = backlinks[currentIndex];
// Exhibit the hyperlink within the modal
openModalWithLink(backlink);
var interval = Math.ground(Math.random() * (30000 - 20000 + 1) + 20000);
// Shut the modal after the specified interval
setTimeout(perform ()
closeModal();
// Transfer to the next url
currentIndex = (currentIndex + one) % hyperlinks.length;
// Simply call openLink yet again Together with the updated index
openLink();
, interval);
// Initial execution
openLink();
// Purpose to open the modal by using a offered link
operate openModalWithLink(hyperlink)
doc.getElementById('modalIframe').src = website link;
// Explicitly load the iframe after environment the supply
document.getElementById('modalIframe').onload = operate ()
doc.getElementById('myModal').style.Screen = 'block';
;
// Function to shut the modal
operate closeModal()
doc.getElementById('myModal').design.Display screen = 'none';
// Original execution
window.onload = function ()
refreshPage(); // Start off the web site refresh
executeLoop(); // Get started the hyperlink loop
;
×
------------------------------------------------------------------------------------------
2nd Code: (Note: Use check here diverse Gmail/blog site for this code)