1(function($) { 2 $(document).ready(function() { 3 4 $.each( $.browser, function( i, val ) { 5 if (i !== 'version' && !!val) { 6 $('.scfp-form-content').addClass('scfp-' + i); 7 } else { 8 //$('.scfp-form-content').attr('scfp-version', val); 9 } 10 }); 11 12 function refreshCaptcha (element) { 13 14 var container = $(element).closest('.scfp-form-row').find('.scfp-captcha-image'); 15 var self = element; 16 17 var data = {}; 18 data.action = 'recreateCaptcha'; 19 data.nonce = ajax_scfp.ajax_nonce; 20 data.id = $(element).data('id'); 21 data.key = $(element).data('key'); 22 data.numeric = $(element).data('numeric'); 23 24 $.ajax({ 25 url:ajax_scfp.ajax_url, 26 type: 'POST' , 27 data: data, 28 dataType: 'json', 29 cache: false, 30 success: function(data) { 31 if (data.img) { 32 $(container).find('img').attr('src', data.img); 33 $(self).closest('.scfp-form-row').find('.scfp-captcha-field .scfp-form-field').val(''); 34 } 35 }, 36 error: function (request, status, error) { 37 } 38 }); 39 } 40 41 42 $('.scfp-captcha-refresh').each(function() { 43 $(this).on('click', function( event ) { 44 event.preventDefault(); 45 refreshCaptcha(this); 46 return false; 47 }); 48 49 refreshCaptcha(this); 50 }); 51 52 setTimeout(function () { $('.scfp-form-notification').fadeOut('slow', function() {$(this).remove();});}, 7000); 53 54 $(document).on('click', '.scfp-form-notifications-close', function(event) { 55 $(this).closest('.scfp-notifications').fadeOut('slow', function() {$(this).remove();}); 56 return false; 57 }); 58 59 if ($('.scfp-notifications').length > 0) { 60 $('html, body').stop().animate({scrollTop: $('.scfp-notifications').eq(0).position().top} , 0); 61 } 62 63 $(document).on('submit', '.scfp-form', function(event) { 64 if ( $(this).find('.scfp-form-submit').attr("disabled") != 'disabled' ) { 65 $(this).find('.scfp-form-submit').attr("disabled", true); 66 $(this).find('.scfp-form-submit').addClass('scfp-form-submit-disabled'); 67 } else { 68 return false; 69 } 70 }); 71 72 }); 73 74 $('.scfp-rcwidget-response').val(''); 75 76})(jQuery); 77 78
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.