Use ctrl keybind to assist in copy and paste
This commit is contained in:
parent
9b5d00049a
commit
ec017915c2
1 changed files with 67 additions and 60 deletions
127
index.html
127
index.html
|
@ -1,71 +1,78 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<div class="form_row">
|
||||
<button type="button" id="copy">Generate and Copy to Clipboard</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_row">
|
||||
Fill out the boxes and hit ctrl+c to copy your password.
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hidden">
|
||||
<input type="text" id="password" readyonly="readyonly" tabindex="-1" />
|
||||
</div>
|
||||
<div class="hidden">
|
||||
<input type="text" id="password" readyonly="readyonly" tabindex="-1" />
|
||||
</div>
|
||||
|
||||
<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');
|
||||
<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');
|
||||
|
||||
|
||||
$('#generate input').change(function() {
|
||||
var root = $('#root').val();
|
||||
var master = $('#master').val()
|
||||
var hash = $.md5(root + master);
|
||||
$('#generate input').on('input', function() {
|
||||
var root = $('#root').val();
|
||||
var master = $('#master').val()
|
||||
var hash = $.md5(root + master);
|
||||
|
||||
hash = hash.replace(/[a-f]/, function(alpha) {
|
||||
return alpha.toUpperCase();
|
||||
});
|
||||
hash = hash.replace(/[a-f]/, function(alpha) {
|
||||
return alpha.toUpperCase();
|
||||
});
|
||||
|
||||
if(root in special) {
|
||||
$('#password').val(special[root](hash));
|
||||
} else {
|
||||
$('#password').val(hash);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
if(root in special) {
|
||||
$('#password').val(special[root](hash));
|
||||
} else {
|
||||
$('#password').val(hash);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).keydown(function(e) {
|
||||
var keycode = e.keycode || e.which;
|
||||
if(keycode == 17) {
|
||||
$('#password').focus().select();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue