title: Open URL in new window with JavaScript
body: <p>I'm making a "share button" to share the current page. I would like to take the current page URL and open it in a new window. I have the current URL part working, but can't seem to get the next part working. </p>
  
  <p>I'm struggling with the syntax. I would like to specify the new window size to <code>width=520, height=570</code>.</p>
  
  <p>Something like: </p>
  
  <pre><code>&lt;a target="_blank"
     href="https://www.linkedin.com/cws/share?mini=true&amp;amp;url=[sub]" 
     onclick="this.href = this.href.replace('[sub]',window.location)"&gt;
      LinkedIn
  &lt;/a&gt;
  </code></pre>
  
  <p>Any ideas?</p>