title: How to hide everything before page load with Chrome Extension
body: <p>I tried using content scripts</p>
  
  <p><code>manifest</code></p>
  
  <pre><code>"content_scripts": [
      {
          "matches": ["*://*/*"],
          "js": ["js/content_script.js"]
      }
  ]
  </code></pre>
  
  <p><code>content_script.js</code></p>
  
  <pre><code>_ini();
  function _ini(){
      document.body.style.display="none";
  }
  </code></pre>
  
  <p>But it loads the page first and then it hides it.</p>
  
  <p>So I tried <code>webNavigation</code></p>
  
  <pre><code>chrome.webNavigation.onCommitted.addListener(function(details){
      alert('webnav');
      document.body.style.display="none";
  });
  </code></pre>
  
  <p>But the above didnt work too. The page alerts <code>webnav</code> before page load but display none didnt work.</p>
  
  <p>All I really need is to hide the entire site without showing the client any elements at all. Any ideas?</p>