Submit
Path:
~
/
home
/
getwphos
/
public_html
/
almajd
/
wp-content
/
plugins
/
woocommerce
/
assets
/
js
/
frontend
/
File Content:
password-strength-meter.js
/* global wp, pwsL10n, wc_password_strength_meter_params */ jQuery( function ( $ ) { 'use strict'; /** * Password Strength Meter class. */ var wc_password_strength_meter = { /** * Initialize strength meter actions. */ init: function () { $( 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 ); $( 'form.checkout #createaccount' ).trigger( 'change' ); }, /** * Strength Meter. */ strengthMeter: function () { var wrapper = $( 'form.register, form.checkout, form.edit-account, form.lost_reset_password' ), submit = $( 'button[type="submit"]', wrapper ), field = $( '#reg_password, #account_password, #password_1', wrapper ), strength = 1, fieldValue = field.val(), stop_checkout = ! wrapper.is( 'form.checkout' ); // By default is disabled on checkout. wc_password_strength_meter.includeMeter( wrapper, field ); strength = wc_password_strength_meter.checkPasswordStrength( wrapper, field ); // Allow password strength meter stop checkout. if ( wc_password_strength_meter_params.stop_checkout ) { stop_checkout = true; } if ( fieldValue.length > 0 && strength < wc_password_strength_meter_params.min_password_strength && -1 !== strength && stop_checkout ) { submit.attr( 'disabled', 'disabled' ).addClass( 'disabled' ); } else { submit.prop( 'disabled', false ).removeClass( 'disabled' ); } }, /** * Include meter HTML. * * @param {Object} wrapper * @param {Object} field */ includeMeter: function ( wrapper, field ) { var meter = wrapper.find( '.woocommerce-password-strength' ); if ( '' === field.val() ) { meter.hide(); $( document.body ).trigger( 'wc-password-strength-hide' ); field.removeAttr( 'aria-describedby' ); } else if ( 0 === meter.length ) { var meter = '<div id="password_strength" class="woocommerce-password-strength" role="alert"></div>'; var wrapper = field.parent(); // If the field is inside a password-input, inject the meter after the password-input. if ( wrapper.is( '.password-input' ) ) { wrapper.after( meter ); } else { field.after( meter ); } field.attr( 'aria-describedby', 'password_strength' ); $( document.body ).trigger( 'wc-password-strength-added' ); } else { meter.show(); $( document.body ).trigger( 'wc-password-strength-show' ); } }, /** * Check password strength. * * @param {Object} field * * @return {Int} */ checkPasswordStrength: function ( wrapper, field ) { var meter = wrapper.find( '.woocommerce-password-strength' ), hint = wrapper.find( '.woocommerce-password-hint' ), hint_html = '<small class="woocommerce-password-hint">' + wc_password_strength_meter_params.i18n_password_hint + '</small>', strength = wp.passwordStrength.meter( field.val(), wp.passwordStrength.userInputDisallowedList() ), error = ''; // Reset. meter.removeClass( 'short bad good strong' ); hint.remove(); if ( meter.is( ':hidden' ) ) { return strength; } // Error to append if ( strength < wc_password_strength_meter_params.min_password_strength ) { error = ' - ' + wc_password_strength_meter_params.i18n_password_error; } switch ( strength ) { case 0: meter .addClass( 'short' ) .html( pwsL10n[ 'short' ] + error ); meter.after( hint_html ); break; case 1: meter.addClass( 'bad' ).html( pwsL10n.bad + error ); meter.after( hint_html ); break; case 2: meter.addClass( 'bad' ).html( pwsL10n.bad + error ); meter.after( hint_html ); break; case 3: meter.addClass( 'good' ).html( pwsL10n.good + error ); break; case 4: meter.addClass( 'strong' ).html( pwsL10n.strong + error ); break; case 5: meter.addClass( 'short' ).html( pwsL10n.mismatch ); break; } return strength; }, }; wc_password_strength_meter.init(); } );
Submit
FILE
FOLDER
Name
Size
Permission
Action
test
---
0755
a8c-address-autocomplete-service.js
13187 bytes
0644
a8c-address-autocomplete-service.min.js
5065 bytes
0644
account-i18n.js
712 bytes
0644
account-i18n.min.js
179 bytes
0644
add-payment-method.js
1415 bytes
0644
add-payment-method.min.js
905 bytes
0644
add-to-cart-variation.js
30253 bytes
0644
add-to-cart-variation.min.js
14751 bytes
0644
add-to-cart.js
8414 bytes
0644
add-to-cart.min.js
4035 bytes
0644
address-autocomplete.js
24206 bytes
0644
address-autocomplete.min.js
8330 bytes
0644
address-i18n.js
5053 bytes
0644
address-i18n.min.js
2750 bytes
0644
cart-fragments.js
5639 bytes
0644
cart-fragments.min.js
2939 bytes
0644
cart.js
20962 bytes
0644
cart.min.js
9878 bytes
0644
checkout.js
33724 bytes
0644
checkout.min.js
18099 bytes
0644
country-select.js
6367 bytes
0644
country-select.min.js
3494 bytes
0644
credit-card-form.js
588 bytes
0644
credit-card-form.min.js
518 bytes
0644
geolocation.js
3845 bytes
0644
geolocation.min.js
1286 bytes
0644
lost-password.js
159 bytes
0644
lost-password.min.js
132 bytes
0644
order-attribution.js
6721 bytes
0644
order-attribution.min.js
2346 bytes
0644
password-strength-meter.js
4216 bytes
0644
password-strength-meter.min.js
2190 bytes
0644
price-slider.js
3065 bytes
0644
price-slider.min.js
2138 bytes
0644
single-product.js
16883 bytes
0644
single-product.min.js
9649 bytes
0644
tokenization-form.js
3841 bytes
0644
tokenization-form.min.js
2264 bytes
0644
woocommerce.js
6913 bytes
0644
woocommerce.min.js
3915 bytes
0644
wp-consent-api-integration.js
727 bytes
0644
wp-consent-api-integration.min.js
435 bytes
0644
N4ST4R_ID | Naxtarrr