title: detect when user refresh a page
body: <p>I'm developing a chrome extension that show a popup on certain domains . 
  the popup should be displayed each time the user visit the webpage or refresh the current page with one of the targeted domains . 
  so first I've putted a listener when the current tab is updated : </p>
  
  <pre><code>chrome.runtime.onInstalled.addListener(function () {
      chrome.tabs.onUpdated.addListener(onTabUpdate);
  });
  </code></pre>
  
  <p>the <code>onTabUpdate</code> function get executed every time a page is loaded ( I've deleted some unnecessary code like domains test ) : </p>
  
  <pre><code>function onTabUpdate(tabId, info, tab) {
  //if page is refreshed
  if (info.url === undefined) {
      if (info.status == 'loading') {
          console.log('Refresh happened for tab: ' + tabId)
          tabsLoaded = {};
          loadPopup(tabId);
      }
  }
  //if page is first time loaded 
  if (tab.status !== 'complete') {
      return;
  } else {
      console.log("page loaded ");
      loadPopup(tabId);
  
  }}
  </code></pre>
  
  <p>the code runs very well and detect when the page is loaded or refreshed , the problem is that when I show the popup and the user close it , the refresh event is triggered and the popup shows again . I think because chrome redraw the DOM and refresh the page . 
  So I'm looking way to detect when the <strong>user him self</strong> refresh the page not when chrome does.</p>