PageSourceSearch

https://dgfi.org/wp-content/plugins/sexy-login/js/sexy-login.js?ver=2.0

js dgfi.org collected 2026-10-02 03:43:34 UTC 5,578 bytes, 257 lines download raw bytes

1var slCurrentTab	= '';
2
3function slRecaptchaCreate( tab ) {
4
5	jQuery( '.sexy-div-captcha' ).html( '' );
6	jQuery( '#sexy-' + tab + '-recaptcha' ).html( 
7		'<div id="sexy-recaptcha-container">' + 
8			'<div id="recaptcha_image"></div>' +
9			'<div>' +
10				'<a href="javascript:Recaptcha.reload()">' + sexy_loginl_data.captcha_get + '</a>' +
11			'</div>' +
12			'<!--[if IE ]><label for="recaptcha_response_field">' + sexy_loginl_data.captcha_enter + ':</label><![endif]-->' +
13			'<input type="text" id="recaptcha_response_field" tabindex="423" name="recaptcha_response_field" placeholder="' + sexy_loginl_data.captcha_enter + '..." required/>' + 
14		'</div>'
15	);
16	
17	Recaptcha.create(
18		sexy_loginl_data.public_key,
19		'sexy-recaptcha-container',
20		{
21			theme: "custom"
22		}
23	);
24	
25}
26
27function slTabChange( tab ) {
28	
29	if ( slCurrentTab == tab )
30		return false;
31	else
32		slCurrentTab	= tab;
33		
34	jQuery( '.sexy-login-form-wrap' ).hide();
35	jQuery( '#sexy-login-' + tab + '-form' ).show();
36	jQuery( '.sexy-login-tab' ).removeClass( 'selected' );
37	jQuery( 'a[name=sl-tab-' + tab + ']' ).addClass( 'selected' );
38	
39	Recaptcha.destroy();
40	
41	if ( tab != 'lostpwd' &&  jQuery( '#sexy-' + tab + '-recaptcha' ).css( 'display' ) == 'block' )
42		slRecaptchaCreate( tab );
43		
44	jQuery( '#sl-first-input-' + tab ).focus();
45	jQuery( '.sl-input' ).val('');
46	
47}
48
49function slBlockTab( errorDiv, wrapDiv ) {
50	
51	errorDiv.slideUp('fast');
52	wrapDiv.block({ 
53		message: '<img src="' + sexy_loginl_data.loadingurl + '" />', 
54		overlayCSS: { 
55			backgroundColor: '#fff', 
56			opacity:         0.6 
57		},
58		css: {
59			padding:    0,
60			margin:     0,
61			width:      '30%',
62			left:       '35%',
63			textAlign:  'center',
64			color:      '#000',
65			border:     'none',
66			cursor:     'wait'
67		}
68	});	
69
70}
71
72jQuery(	function() {
73
74	var wrapDiv			= jQuery( '#sexy-login-wrap' );
75	var errorDiv		= jQuery( '#sexy-login-show-error' );
76 
77	if ( jQuery( '#sexy-login-recaptcha' ).css( 'display' ) == 'block' )
78		slTabChange( 'login' );
79	
80	jQuery('#sexy-login-wrap a[name=sl-tab-login]').click( function(e) {
81		
82		e.preventDefault();
83		slTabChange( 'login' );
84		
85	});
86	
87	jQuery('#sexy-login-wrap a[name=sl-tab-lostpwd]').click( function(e) {
88		
89		e.preventDefault();
90		slTabChange( 'lostpwd' );
91		
92	});
93	
94	jQuery('#sexy-login-wrap a[name=sl-tab-registration]').click( function(e) {
95		
96		e.preventDefault();
97		slTabChange( 'registration' );
98		
99	});
100
101	jQuery('#sexy-login-wrap #sl-login-form').submit( function( e ) {
102				
103		e.preventDefault();
104		
105		var captchaDiv	= jQuery( '#sexy-login-recaptcha' );
106		
107		jQuery.ajax({
108		
109			url:		sexy_loginl_data.ajaxurl,
110			data:		jQuery( this ).serialize() + '&action=sexy_login_hook',
111			type:		'POST',
112			dataType:	'json',
113			
114			beforeSend: function() {
115			
116				slBlockTab( errorDiv, wrapDiv );
117		
118			},
119			
120			success: function( result ) {
121				
122				if ( result.success == 1 ) {
123				
124					window.location = result.redirect;
125					
126				} else {
127				
128					wrapDiv.unblock();
129					errorDiv.html(result.error);
130
131					if ( result.captcha ) {
132						
133						if ( jQuery( '#sexy-login-recaptcha' ).css( 'display' ) == 'none' ) {
134							
135							jQuery( '#sexy-login-recaptcha' ).show();
136							slRecaptchaCreate( 'login' );							
137							
138						} else {
139							Recaptcha.reload();
140						}
141						
142					}
143					
144					errorDiv.slideDown('fast');
145						
146				}
147				
148			},
149			
150			error: function( xhr, textStatus, errorThrown ) {
151				
152				wrapDiv.html( 'ERROR' );
153				
154			}
155			
156		});
157	
158	}); // END sl-login-form submit.
159	
160	jQuery('#sexy-login-wrap #sl-registration-form').submit( function( e ) {
161				
162		e.preventDefault();
163		
164		jQuery.ajax({
165		
166			url:		sexy_loginl_data.ajaxurl,
167			data:		jQuery( this ).serialize() + '&action=sexy_registration_hook',
168			type:		'POST',
169			dataType:	'json',
170			
171			beforeSend: function() {
172				
173				slBlockTab( errorDiv, wrapDiv );
174				
175			},
176			
177			success: function( result ) {
178				
179				if ( result.success == 1 ) {
180				
181					wrapDiv.unblock();
182					errorDiv.html(result.message);
183					errorDiv.slideDown('fast');
184					slTabChange( 'login' );
185					
186				} else {
187					
188					wrapDiv.unblock();
189					
190					errorDiv.html(result.error);
191					
192					if ( jQuery( '#sexy-registration-recaptcha' ).css( 'display' ) == 'block' )	
193						Recaptcha.reload();
194						
195					errorDiv.slideDown('fast');	
196						
197				}
198				
199			},
200			
201			error: function( xhr, textStatus, errorThrown ) {
202				
203				wrapDiv.html( 'ERROR' );
204				
205			}
206			
207		});
208	
209	});
209 // END sl-registration-form
210	
211	jQuery('#sexy-login-wrap  #sl-lostpwd-form').submit( function( e ) {
212				
213		e.preventDefault();
214		
215		jQuery.ajax({
216		
217			url:		sexy_loginl_data.ajaxurl,
218			data:		jQuery( this ).serialize() + '&action=sexy_lostpwd_hook',
219			type:		'POST',
220			dataType:	'json',
221			
222			beforeSend: function() {
223			
224				slBlockTab( errorDiv, wrapDiv );
225		
226			},
227			
228			success: function( result ) {
229				
230				if ( result.success == 1 ) {
231				
232					wrapDiv.unblock();
233					errorDiv.html(result.message);
234					errorDiv.slideDown('fast');
235					slTabChange( 'login' );
236					
237				} else {
238					
239					wrapDiv.unblock();
240					errorDiv.html(result.error);
241					errorDiv.slideDown('fast');
242						
243				}
244				
245			},
246			
247			error: function( xhr, textStatus, errorThrown ) {
248				
249				wrapDiv.html( 'ERROR' );
250				
251			}
252			
253		});
254	
255	}); // END sl-lostpwd-form submit
256	
257}); // END on document ready.

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.