* add password auto-clearing after 60s * display blank password if either site or password is blank * switch to sha1 * add license info to passy.js * created passytiny.js and passytiny.html (which includes passytiny.js already)
48 lines
1.4 KiB
HTML
48 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<script type='text/javascript' src='passytiny.js'></script>
|
|
<script type='text/javascript'>
|
|
var password_timer=0;
|
|
function ClearPassword()
|
|
{
|
|
// clear password field and force an update
|
|
document.getElementById('password').value = "";
|
|
document.getElementById('password').focus();
|
|
UpdatePassy();
|
|
}
|
|
function UpdatePassy()
|
|
{
|
|
// do password update
|
|
var site = document.getElementById('site').value;
|
|
var password = document.getElementById('password').value;
|
|
if ( site == "" || password == "" )
|
|
{
|
|
document.getElementById('result').value = "";
|
|
}
|
|
else
|
|
{
|
|
document.getElementById('result').value = passy(site,password)[0];
|
|
}
|
|
|
|
// set timer to clear password field after a minute
|
|
if ( password_timer != 0 )
|
|
{
|
|
clearTimeout(password_timer);
|
|
}
|
|
password_timer = setTimeout('ClearPassword()',60000);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form>
|
|
Site Name:<br/>
|
|
<input type='text' id='site' onkeydown='UpdatePassy()' onkeyup='UpdatePassy()' onchange='UpdatePassy()'><br/>
|
|
Secret Passphrase:<br/>
|
|
<input type='password' id='password' onkeydown='UpdatePassy()' onkeyup='UpdatePassy()' onchange='UpdatePassy()'><br/>
|
|
<hr/>
|
|
Site Password:<br/>
|
|
<input type='text' id='result' readonly onfocus='this.select()' onclick='this.select()' ondblclick='this.select()'>
|
|
</form>
|
|
</body>
|
|
</html>
|