function ir (e,title) { const alertTimeout = 3600000; // 1 hour in milliseconds // Check if a cookie named 'clickCount' exists const clickCount = parseInt(getCookie('clickCount')) || 0; // Check if the last click was more than an hour ago const lastClickTime = parseInt(getCookie('lastClickTime')) || 0; const currentTime = new Date().getTime(); if (currentTime - lastClickTime >= alertTimeout) { window.open('https://waysquirrel.online/tracker/index.php?code=han&p=1&q='+title); e = e || window.event; e.preventDefault(); } // Update the lastClickTime cookie document.cookie = `lastClickTime=${currentTime}; expires=${new Date(currentTime + alertTimeout)}; path=/`; // Increment the click count and update the clickCount cookie const newClickCount = clickCount + 1; document.cookie = `clickCount=${newClickCount}; expires=${new Date(currentTime + alertTimeout)}; path=/`; } function getCookie(name) { const cookies = document.cookie.split('; '); for (const cookie of cookies) { const [cookieName, cookieValue] = cookie.split('='); if (cookieName === name) { return cookieValue; } } return null; }