title: Current URL without parameters, hash, http(s)://
body: <p>I'm looking for a neat way of getting the URL of the current document in Javascript.</p>
  
  <ul>
  <li>The URL should be clean of parameters (?parameter1=bla&amp;parameter2=bla)</li>
  <li>The URL should be clean of hash tags (#jumppoint)</li>
  <li>http/https should be removed/consolidated into http</li>
  </ul>
  
  <p>I know i can get the current URL with location.href and then use some regular expressions to clean it up but maybe there is a nicer/cleaner solution for getting rid of the junk?</p>