2013-08-04 01:38:07 -04:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html lang="en">
|
2013-08-04 02:15:31 -04:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Password Generator</title>
|
|
|
|
<link href="css/html5reset-1.6.1.css" rel="stylesheet" type="text/css" />
|
|
|
|
<!--[if IE]>
|
|
|
|
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
|
|
<![endif]-->
|
|
|
|
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
|
|
|
</head>
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
<body>
|
|
|
|
<div id="wrapper">
|
|
|
|
<div id="box">
|
|
|
|
<div id="header">
|
|
|
|
<h1>Passwdgen v1.0</h1>
|
|
|
|
</div>
|
|
|
|
<div id="generate">
|
|
|
|
<form id="generate">
|
|
|
|
<div class="form_row">
|
|
|
|
<label for="root">Root Domain:</label>
|
|
|
|
<input type="text" id="root" name="root" />
|
|
|
|
</div>
|
|
|
|
<div class="form_row">
|
|
|
|
<label for="master">Master Password:</label>
|
|
|
|
<input type="password" id="master" name="master" autocomplete="off" />
|
|
|
|
</div>
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
<div class="form_row">
|
|
|
|
Fill out the boxes and hit ctrl+c to copy your password.
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
<div class="hidden">
|
|
|
|
<input type="text" id="password" readyonly="readyonly" tabindex="-1" />
|
|
|
|
</div>
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
|
|
|
|
<script src="js/jquery.corner.min.js"></script>
|
|
|
|
<script src="js/jquery.md5.min.js"></script>
|
|
|
|
<script src="js/rules.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('input').corner('round 4px');
|
|
|
|
$('button').corner('round 4px');
|
|
|
|
$('#box').corner('round bottom');
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-26 16:49:45 -04:00
|
|
|
$('#root').focus();
|
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
$('#generate input').on('input', function() {
|
|
|
|
var root = $('#root').val();
|
|
|
|
var master = $('#master').val()
|
|
|
|
var hash = $.md5(root + master);
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
hash = hash.replace(/[a-f]/, function(alpha) {
|
|
|
|
return alpha.toUpperCase();
|
|
|
|
});
|
2013-08-04 01:38:07 -04:00
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
if(root in special) {
|
|
|
|
$('#password').val(special[root](hash));
|
|
|
|
} else {
|
|
|
|
$('#password').val(hash);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2013-08-04 12:33:18 -04:00
|
|
|
var currentFocus;
|
|
|
|
var lastFocus;
|
|
|
|
$(':input').focus(function() {
|
|
|
|
currentFocus = this;
|
|
|
|
});
|
|
|
|
|
2013-08-04 02:15:31 -04:00
|
|
|
$(document).keydown(function(e) {
|
|
|
|
var keycode = e.keycode || e.which;
|
|
|
|
if(keycode == 17) {
|
2013-08-04 12:33:18 -04:00
|
|
|
lastFocus = currentFocus;
|
2013-08-04 02:15:31 -04:00
|
|
|
$('#password').focus().select();
|
|
|
|
}
|
|
|
|
});
|
2013-08-04 12:33:18 -04:00
|
|
|
|
|
|
|
$(document).keyup(function(e) {
|
|
|
|
var keycode = e.keycode || e.which;
|
|
|
|
if(keycode == 17) {
|
|
|
|
lastFocus.focus();
|
|
|
|
}
|
|
|
|
});
|
2013-08-04 02:15:31 -04:00
|
|
|
</script>
|
|
|
|
</body>
|
2013-08-04 01:40:28 -04:00
|
|
|
</html>
|