PluginProbe ʕ •ᴥ•ʔ
reCaptcha by BestWebSoft / 1.02
reCaptcha by BestWebSoft v1.02
1.79 1.80 1.82 1.83 1.84 1.85 1.86 1.87 trunk 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.70 1.71 1.72 1.73 1.74 1.75 1.78
google-captcha / js / script.js
google-captcha / js Last commit date
script.js 12 years ago
script.js
54 lines
1 (function( $ ) {
2 var gglcptch_match = true;
3 $( document ).ready(function() {
4 $( '#recaptcha_widget_div' ).parent().children( 'input:submit' ).click(function() {
5 click_trigger();
6 return gglcptch_match;
7 });
8 $( '#cntctfrm_contact_form' ).find( 'input:submit' ).click(function() {
9 click_trigger();
10 return gglcptch_match;
11 });
12 });
13
14 function click_trigger() {
15 var req = getXmpHttp();
16 /* fields for checking Google Captcha */
17 var recaptcha_challenge_field = $( '#recaptcha_challenge_field' ).val();
18 var recaptcha_response_field = $( '#recaptcha_response_field' ).val();
19 /* opening asynchronous connection */
20 req.open( 'POST', gglcptch_path, false );
21 req.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
22 /* sending POST parameters */
23 req.send( 'recaptcha_challenge_field=' + recaptcha_challenge_field + '&recaptcha_response_field=' + recaptcha_response_field + '&gglcptch_private_key=' + gglcptch_private_key );
24
25 if ( req.responseText == 'error' ) {
26 /* wrong captcha */
27 if ( ! $( '#gglcptch_error' ).text() ) {
28 $( '#recaptcha_widget_div' ).after( '<label id="gglcptch_error" style="color:#f00;">' + gglcptch_error_msg + '</label>' );
29 gglcptch_match = false;
30 }
31 } else {
32 /* correct catcha */
33 gglcptch_match = true;
34 }
35 }
36
37 /* Creating xmlhttp object */
38 function getXmpHttp() {
39 var xmlhttp;
40 try {
41 xmlhttp = new ActiveXObject( 'Msxml2.XMLHTTP' );
42 } catch ( e ) {
43 try {
44 xmlhttp = new ActiveXObject( 'Microsoft.XMLHTTP' );
45 } catch ( E ) {
46 xmlhttp = false;
47 }
48 }
49 if ( ! xmlhttp && typeof XMLHttpRequest != 'undefined' ) {
50 xmlhttp = new XMLHttpRequest();
51 }
52 return xmlhttp;
53 }
54 })(jQuery);