JavaScript to login account not working
<p>Code that automatically go to login page and click login:</p>

<pre><code>javascript: window.location = 'https://1.1.1.1/login.HTML';
while (true) {
    if (document.readyState == "complete") {
        window.onload(document.forms[0].Submit.click());
        break;
    }
}
</code></pre>

<p><sup>Code passed through <a href="http://jsbeautifier.org/" rel="nofollow">jsbeautifier</a>; original does not have line breaks</sup></p>

<p>I paste this script on urlbar but its not working (it go to <a href="https://1.1.1.1/login.HTML" rel="nofollow">https://1.1.1.1/login.HTML</a> but not login) 
but if I'm on <a href="https://1.1.1.1/login.HTML" rel="nofollow">https://1.1.1.1/login.HTML</a> and paste this script it works. I don't understand why it does not work. </p>
