Remove temp variables for form fields
This commit is contained in:
parent
a8afb22a34
commit
9f93b82223
1 changed files with 3 additions and 5 deletions
|
@ -3,16 +3,14 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#generate input').on('input', function() {
|
$('#generate input').on('input', function() {
|
||||||
var root = $('#root').val();
|
var hash = $.md5($('#root').val() + ('#master').val());
|
||||||
var master = $('#master').val()
|
|
||||||
var hash = $.md5(root + master);
|
|
||||||
|
|
||||||
hash = hash.replace(/[a-f]/, function(alpha) {
|
hash = hash.replace(/[a-f]/, function(alpha) {
|
||||||
return alpha.toUpperCase();
|
return alpha.toUpperCase();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(root in special) {
|
if($('#root').val() in special) {
|
||||||
$('#password').val(special[root](hash));
|
$('#password').val(special[$('#root').val()](hash));
|
||||||
} else {
|
} else {
|
||||||
$('#password').val(hash);
|
$('#password').val(hash);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue