PageSourceSearch

https://www.activative.co.uk/wp-content/plugins/wpcf7-recaptcha/assets/js/wpcf7-recaptcha-controls_ver-1.2.js

js activative.co.uk collected 2026-10-05 20:15:20 UTC 2,658 bytes, 75 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10( function() {
11	
12	let recaptchaWidgets = [];
13	recaptchaCallback = function() {
14		
15		let forms = document.getElementsByTagName( 'form' );
16		let pattern = /(^|\s)g-recaptcha(\s|$)/;
17
18		for ( let i = 0; i < forms.length; i++ ) {
19			let recaptchas = forms[ i ].getElementsByClassName( 'wpcf7-recaptcha' );
20			
21			for ( let j = 0; j < recaptchas.length; j++ ) {
22				let sitekey = recaptchas[ j ].getAttribute( 'data-sitekey' );
23
24				if ( recaptchas[ j ].className && recaptchas[ j ].className.match( pattern ) && sitekey ) {
25					let params = {
26						'sitekey': sitekey,
27						'type': recaptchas[ j ].getAttribute( 'data-type' ),
28						'size': recaptchas[ j ].getAttribute( 'data-size' ),
29						'theme': recaptchas[ j ].getAttribute( 'data-theme' ),
30						'align': recaptchas[ j ].getAttribute( 'data-align' ),
31						'badge': recaptchas[ j ].getAttribute( 'data-badge' ),
32						'tabindex': recaptchas[ j ].getAttribute( 'data-tabindex' )
33					};
34
35					let callback = recaptchas[ j ].getAttribute( 'data-callback' );
36
37					if ( callback && 'function' == typeof window[ callback ] ) {
38						params[ 'callback' ] = window[ callback ];
39					}
40
41					let expired_callback = recaptchas[ j ].getAttribute( 'data-expired-callback' );
42
43					if ( expired_callback && 'function' == typeof window[ expired_callback ] ) {
44						params[ 'expired-callback' ] = window[ expired_callback ];
45					}
46
47					let widget_id = grecaptcha.render( recaptchas[ j ], params );
48					recaptchaWidgets.push( widget_id );
49					break;
50				}
51			}
52		}
53	};
54
55	/**
56	 * Reset the reCaptcha when Contact Form 7 gives us:
57	 *  - Spam
58	 *  - Success
59	 *  - Fail
60	 * 
61	 * @return void
62	 */
63	document.addEventListener( 'wpcf7submit', function( event ) {
64		switch ( event.detail.status ) {
65			case 'spam':
66			case 'mail_sent':
67			case 'mail_failed':
68				for ( let i = 0; i < recaptchaWidgets.length; i++ ) {
69					grecaptcha.reset( recaptchaWidgets[ i ] );
70				}
71		}
72	}, false );
73	
74} )();
75}

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.