minor updates and compression

* 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)
This commit is contained in:
swaits committed 2010-11-12 15:24:16 -08:00
1 parent 013377b414
commit 693d0b815e
4 files changed
+132 -3

No files matched your search

+25 -3
View File
@@ -1,13 +1,35 @@
<html>
<head>
<script type='text/javascript' src='jsSHA/src/sha1.js'></script>
<script type='text/javascript' src='passy.js'></script>
<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;
document.getElementById('result').value = passy(site,password)[0];
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>