title: Remove everything after domain and http in url javascript
body: <p>I have the full url in a javascript variable and I want to strip it down to the bare url.</p>
  
  <p>For example:</p>
  
  <p><a href="https://www.google.com/hello/hi.php" rel="noreferrer">https://www.google.com/hello/hi.php</a>, 
  <a href="http://youtube.com" rel="noreferrer">http://youtube.com</a></p>
  
  <p>strip down to:</p>
  
  <p>www.google.com, youtube.com</p>
  
  <p>How would I do this in javascript?</p>
  
  <p>Thanks</p>
  
  <p>This is not similar to the other links as I am doing this within a chrome extension, therefore the only way to get the url is using the chrome extension api which only provides the full url. As such I need to strip the full url</p>