Allow window.open to open new window and not popup
<p>I have this JS code:</p>

<pre><code>window.open(loginurl, '_blank');
</code></pre>

<p>coming from a condition for example:</p>

<pre><code>if (userloggedin) {

//popup another page

} else {

window.open(loginurl, '_blank');

}
</code></pre>

<p>"loginurl" is an login URL that I would like to open in new window.</p>

<p>Problem: This will be blocked in most browsers (Firefox and Chrome) because it behaves like a popup.</p>

<p>I would like a solution that will still utilizes my login URL variable (not altering the if else statement), open it in new window without any warnings of a popup that is being blocked.</p>

<p>I am searching for ways but I never found a solution. If somebody can provide some tips or insights. That would be highly appreciated.</p>

<p>Thanks.</p>
