Use ctrl keybind to assist in copy and paste

This commit is contained in:
Andrew Tomaka 2013-08-04 02:15:31 -04:00
parent 9b5d00049a
commit ec017915c2

View file

@ -28,7 +28,7 @@
</div> </div>
<div class="form_row"> <div class="form_row">
<button type="button" id="copy">Generate and Copy to Clipboard</button> Fill out the boxes and hit ctrl+c to copy your password.
</div> </div>
</form> </form>
</div> </div>
@ -50,7 +50,7 @@
$('#box').corner('round bottom'); $('#box').corner('round bottom');
$('#generate input').change(function() { $('#generate input').on('input', function() {
var root = $('#root').val(); var root = $('#root').val();
var master = $('#master').val() var master = $('#master').val()
var hash = $.md5(root + master); var hash = $.md5(root + master);
@ -66,6 +66,13 @@
} }
}); });
}); });
$(document).keydown(function(e) {
var keycode = e.keycode || e.which;
if(keycode == 17) {
$('#password').focus().select();
}
});
</script> </script>
</body> </body>
</html> </html>