PageSourceSearch

https://wpenhanced.com/wp-content/plugins/som-strong-passwords-edd/assets/js/somspedd-script-03.js?ver=1.0.0

js wpenhanced.com collected 2026-09-24 09:06:01 UTC 2,659 bytes, 102 lines download raw bytes

1(function($) {
2
3	var password_input = '';
4
5	window.somPasswordStrength = function ( password ) {
6
7		var strength_active = $( '#password-strength-active' ).val();
8		if ( strength_active <= 0 ) {
9			return;
10		}
11
12		var meter = document.getElementById( 'password-strength-meter-val');
13		var text = document.getElementById( 'password-strength-meter-text');
14
15		if ( $( meter ).length ) {
16
17			//console.log('password = ' + password)
18
19			var val = password.val();
20			var result = zxcvbn(val);
21
22			// Update the password strength meter
23			meter.value = result.score;
24
25			// Update the text indicator
26			if (val !== "") {
27				text.innerHTML = "<span class='somspedd-strenth-span'>" + sompass_strength_text + ": </span>" + sompass_strength[result.score]; 
28			} else {
29				text.innerHTML = "<span class='somspedd-strenth-span'>" + sompass_strength_text + ": </span>" + sompass_strength[0];
30			}
31
32		}
33
34	};
35
36	function som_setup_pass( pass_input ) {
37		$( '#som-meter-wrap' ).insertAfter( pass_input );
38		var pass_width = $( pass_input ).outerWidth();
39		$( '#som-meter-wrap' ).css( 'max-width', pass_width );
40		$( '#som-meter-wrap' ).css( 'display', 'block' );
41		$( '#password-strength-active' ).val( '1' );
42	}
43
44	$( document ).ready( function() {
45
46		if ( $( '#som-meter-wrap' ).length ) {
47
48			// Register Shortcode
49			if ( $( '#edd_register_form' ).length ) {
50				som_setup_pass( $( '#edd-user-pass' ) );
51				password_input = $( '#edd-user-pass' );
52			}
53
54			// Profile Editor Shortcode
55			if ( $( '#edd_profile_editor_form' ).length ) {
56				som_setup_pass( $( '#edd_new_user_pass1' ) );
57				password_input = $( '#edd_new_user_pass1' );
58			}
59
60			// Checkout Form
61			if ( $( '#edd_register_account_fields' ).length ) {
62				som_setup_pass( $( '#edd_user_pass' ) );
63				password_input = $( '#edd_user_pass' );
64			}
65
66			// Frontend Reset Password - WP Enhanced
67			if ( $( '#password-lost-form-wrap #resetpasswordform' ).length ) {
68				som_setup_pass( $( '#som_new_user_pass' ) );
69				password_input = $( '#som_new_user_pass' );
70			}
71
72			$( window ).resize( function() {
73				var pass_width = $( password_input ).outerWidth();
74				$( '#som-meter-wrap' ).css( 'max-width', pass_width );
75			});
76
77		}
78
79	});
80
81	$( 'body' ).on( 'edd_gateway_loaded', function () {
82
83		if ( $( '#som-meter-wrap' ).length ) {
84
85			// Checkout Form after gateway selected
86			if ( $( '#edd_register_account_fields' ).length ) {
87
88				som_setup_pass( $( '#edd_user_pass' ) );
89				password_input = $( '#edd_user_pass' );
90
91				$( window ).resize( function() {
92					var pass_width = $( password_input ).outerWidth();
93					$( '#som-meter-wrap' ).css( 'max-width', pass_width );
94				});
95
96			}
97
98		}
99
100	});
101
102})( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.