Unused var

This commit is contained in:
Mike Jolley 2016-01-28 15:38:27 +00:00
parent 6a8e89da2f
commit 26a7d04c07
2 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ jQuery( function( $ ) {
*/
strengthMeter: function() {
var wrapper = $( 'form.register, form.checkout, form.edit-account, form.lost_reset_password' ),
submit = $( 'input[type="submit"]', wrapper ),
field = $( '#reg_password, #account_password, #password_1', wrapper ),
strength = 1;

View File

@ -1 +1 @@
jQuery(function(a){var b={init:function(){a(document.body).on("keyup","form.register #reg_password, form.checkout #account_password, form.edit-account #password_1, form.lost_reset_password #password_1",this.strengthMeter).on("submit","form.register, form.edit-account, form.lost_reset_password",this.onSubmit),a("form.checkout #createaccount").change()},strengthMeter:function(){var c=a("form.register, form.checkout, form.edit-account, form.lost_reset_password"),d=a('input[type="submit"]',c),e=a("#reg_password, #account_password, #password_1",c),f=1;b.includeMeter(c,e),f=b.checkPasswordStrength(e),3===f||4===f?c.removeClass("has-weak-password"):c.addClass("has-weak-password"),3===f||4===f?d.removeClass("disabled"):c.hasClass("checkout")||d.addClass("disabled")},onSubmit:function(){return a(".woocommerce-password-error").remove(),a(this).is(".has-weak-password")?(a(this).prepend('<div class="woocommerce-error woocommerce-password-error">'+wc_password_strength_meter_params.i18n_password_error+"</div>"),!1):!0},includeMeter:function(a,b){var c=a.find(".woocommerce-password-strength");0===c.length?b.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'):""===b.val()&&c.remove()},checkPasswordStrength:function(b){var c=a(".woocommerce-password-strength"),d=a(".woocommerce-password-hint"),e='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",f=wp.passwordStrength.meter(b.val(),wp.passwordStrength.userInputBlacklist());switch(c.removeClass("short bad good strong"),d.remove(),f){case 1:c.addClass("bad").html("wtf"),c.after(e);break;case 2:c.addClass("bad").html(pwsL10n.bad),c.after(e);break;case 3:c.addClass("good").html(pwsL10n.good);break;case 4:c.addClass("strong").html(pwsL10n.strong);break;case 5:c.addClass("short").html(pwsL10n.mismatch);break;default:c.addClass("short").html(pwsL10n["short"]),c.after(e)}return f}};b.init()});
jQuery(function(a){var b={init:function(){a(document.body).on("keyup change","form.register #reg_password, form.checkout #account_password, form.edit-account #password_1, form.lost_reset_password #password_1",this.strengthMeter),a("form.checkout #createaccount").change()},strengthMeter:function(){var c=a("form.register, form.checkout, form.edit-account, form.lost_reset_password"),d=a("#reg_password, #account_password, #password_1",c),e=1;b.includeMeter(c,d),e=b.checkPasswordStrength(d),e<wc_password_strength_meter_params.min_password_strength&&!c.is("form.checkout")?d.get(0).setCustomValidity(wc_password_strength_meter_params.i18n_password_error):d.get(0).setCustomValidity("")},includeMeter:function(a,b){var c=a.find(".woocommerce-password-strength");0===c.length?b.after('<div class="woocommerce-password-strength" aria-live="polite"></div>'):""===b.val()&&c.remove()},checkPasswordStrength:function(b){var c=a(".woocommerce-password-strength"),d=a(".woocommerce-password-hint"),e='<small class="woocommerce-password-hint">'+wc_password_strength_meter_params.i18n_password_hint+"</small>",f=wp.passwordStrength.meter(b.val(),wp.passwordStrength.userInputBlacklist()),g="",h=b.closest("form");switch(c.removeClass("short bad good strong"),d.remove(),f<wc_password_strength_meter_params.min_password_strength&&!h.is("form.checkout")&&(g=" - "+wc_password_strength_meter_params.i18n_password_error),f){case 0:c.addClass("short").html(pwsL10n["short"]+g),c.after(e);break;case 1:c.addClass("bad").html(pwsL10n.bad+g),c.after(e);break;case 2:c.addClass("bad").html(pwsL10n.bad+g),c.after(e);break;case 3:c.addClass("good").html(pwsL10n.good+g);break;case 4:c.addClass("strong").html(pwsL10n.strong+g);break;case 5:c.addClass("short").html(pwsL10n.mismatch)}return f}};b.init()});