title: Load popup after 30 seconds of browsing
body: <p>I have a popup which is loaded after 30 seconds of viewing the homepage. Is it possible to have it load after 30 seconds of browsing the site and not just a particular page?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Current code still only loads the box after 30 seconds on each page load</p>
  
  <pre><code>var myDaemon = '';
  localStorage.setItem('myTimestamp', Date.now());
  
  if(myDaemon) clearInterval(myDaemon);
      myDaemon = setInterval(function(){
      var TimeDiffinSeconds = (Date.now() - localStorage.myTimestamp) / 1000;
      if( TimeDiffinSeconds &gt; 30){
          requestcallback();
          clearInterval(myDaemon);
          localStorage.myTimestamp = Date.now();
      }
  },1000);
  
  
  function requestcallback(){
      // localStorage.clear();
      var popup
      if(localStorage["popup"] != null){
          var timestamp = new Date().getTime(),
              last_here = new Date();
  
          last_here.setTime(localStorage["popup"]);
  
          var current = last_here.getTime() + (7 * 24 * 60 * 60 * 1000);
  
          if(current &lt; timestamp){
              popup = setTimeout(showPopup, 1);
          }
      }
      else{
          popup = setTimeout(showPopup, 1);   
      }
  
      function showPopup(){
          jQuery('.overlay').fadeIn();
          clearTimeout(popup);    
      }
  
      jQuery('.overlay .close').click(function(){
          jQuery('.overlay').fadeOut();
          var current = new Date().getTime();
          localStorage["popup"] = current;    
      });
  
  }
  </code></pre>