Suchergebnisse für farm (2 Treffer)

Keine Ergebnisse für Vogelfarm. Zeige stattdessen farm

2 Ergebnisse gefunden
​ ​ ​ ​ ​ ​
Filter
var showPopupDelay = 3000; var showPopupLiveTime = 3; function showPopup() { setTimeout(function() { $('#popup').modal('show'); }, showPopupDelay); } function setPopupDisplayTime() { try { localStorage.setItem('popupLastShown', new Date().getTime().toString()); } catch (e) { console.error('Local storage is not available:', e); } } function shouldShowPopup() { try { const lastShown = localStorage.getItem('popupLastShown'); if (!lastShown) { return true; } const currentTime = new Date().getTime(); const timeDifference = currentTime - parseInt(lastShown, 10); const daysSinceLastShown = timeDifference / (1000 * 3600 * 24); const daysBeforeShowingAgain = showPopupLiveTime; return daysSinceLastShown >= daysBeforeShowingAgain; } catch (e) { console.error('Error checking popup display condition:', e); return true; } } function handlePopupDisplay() { if (shouldShowPopup()) { showPopup(); setPopupDisplayTime(); } } $(document).ready(function(){handlePopupDisplay();});