[Web] Add moore password generator links

This commit is contained in:
andryyy
2019-12-07 21:41:15 +01:00
parent 6ac40f304a
commit eb350d48c0
8 changed files with 34 additions and 29 deletions

View File

@@ -12,6 +12,14 @@ $(document).ready(function() {
$.notify({message: msg},{z_index: 20000, delay: auto_hide, type: type,placement: {from: "bottom",align: "right"},animate: {enter: 'animated fadeInUp',exit: 'animated fadeOutDown'}});
}
$(".generate_password").click(function( event ) {
event.preventDefault();
$('[data-hibp]').trigger('input');
var random_passwd = GPW.pronounceable(8)
$(this).closest("form").find('[data-pwgen-field]').attr('type', 'text');
$(this).closest("form").find('[data-pwgen-field]').val(random_passwd);
});
// https://stackoverflow.com/questions/4399005/implementing-jquerys-shake-effect-with-animate
function shake(div,interval,distance,times) {
if(typeof interval === 'undefined') {