PluginProbe ʕ •ᴥ•ʔ
reCaptcha by BestWebSoft / trunk
reCaptcha by BestWebSoft vtrunk
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 / pre-api-script.js
google-captcha / js Last commit date
admin_script.js 4 months ago pre-api-script.js 8 years ago script.js 6 months ago
pre-api-script.js
64 lines
1 ;var gglcptch_pre = gglcptch_pre || {};
2 gglcptch_pre.is_loaded = false;
3
4 function gglcptch_alert_fail_message( e ) {
5 if ( ! gglcptch_pre.is_loaded ) {
6 e.preventDefault();
7 e.stopImmediatePropagation();
8 alert( gglcptch_pre.messages.timeout );
9 }
10 }
11
12 function gglcptch_onload_callback() {
13 ( function( $ ) {
14 if ( '' != gglcptch_pre.custom_callback ) {
15 eval( gglcptch_pre.custom_callback );
16 }
17 gglcptch_pre.is_loaded = true;
18 $( document ).ready( function() {
19 $( 'form input:submit, form button' ).filter('[data-gglcptch_disabled]')
20 .removeAttr( 'disabled' )
21 .removeAttr( 'data-gglcptch_disabled' )
22 .each( function() {
23 $( this ).restoreTitle();
24 } );
25 } );
26 } )( jQuery );
27 }
28
29 ( function( $ ) {
30 $.fn.storeTitle = function() {
31 var title = ( typeof $( this ).attr( 'title' ) != 'undefined' ) ? $( this ).attr( 'title' ) : '';
32 this.attr( 'data-storedTitle', title );
33 }
34
35 $.fn.restoreTitle = function() {
36 var title = this.attr( 'data-storedTitle' );
37 if ( '' != title ) {
38 this.attr( 'title' ) = title;
39 } else {
40 this.removeAttr( 'title' );
41 }
42 this.removeAttr( 'data-storedTitle' );
43 }
44
45 $( document ).ready( function() {
46 if ( ! gglcptch_pre.is_loaded ) {
47 $( '.gglcptch_v2, .gglcptch_invisible' ).each( function() {
48 $( this ).closest( 'form' )
49 .find( 'input:submit, button' ).filter( ':not(:disabled)' )
50 .attr( 'disabled', 'disabled' ).attr( 'data-gglcptch_disabled', 'true' )
51 .each( function() {
52 $( this ).storeTitle();
53 $( this ).attr( 'title', gglcptch_pre.messages.in_progress );
54 } );
55 } );
56 }
57 } );
58
59 $( window ).on( 'load', function() {
60 if ( ! gglcptch_pre.is_loaded ) {
61 $( '[data-gglcptch_disabled]' ).removeAttr( 'disabled' ).one( 'click', gglcptch_alert_fail_message );
62 }
63 } );
64 } )( jQuery );