1(function ($) { 2 "use strict"; 3 4 5 // check if browser is not supported 6 var $browserAlert = $('#browserAlert'); 7 $browserAlert.hide(); 8 9 $.ajax({ 10 url: 'https://cdn.rawgit.com/arasatasaygin/is.js/master/is.min.js', 11 dataType: "script", 12 success: function() { 13 14 if (is.edge() || is.ie()) { 15 $browserAlert.find('span').text('View on Chrome/Firefox.'); 16 $browserAlert.show(); 17 $browserAlert.addClass('active'); 18 } 19 20 } 21 }); 22 23 24 var $btn = $("button.btnSubmit"); 25 var $loaderTemplate = $("svg.art-round-loader"); 26 var $checkmarkTemplate = $("svg.checkmark"); 27 28 $btn.on('click', function() { 29 let self = $(this); 30 31 document.addEventListener( 'wpcf7mailsent', function( event ) { 32 let button_text = self.text(); 33 if (self.hasClass('clicked')) return; 34 self.addClass('clicked'); 35 let timeout1 = 600, 36 timeout2 = 2500, 37 timeout3 = 3000; 38 39 setTimeout(function() { 40 self.append($loaderTemplate.clone()); 41 self.find('svg').removeClass('svg--template'); 42 self.find('svg').css('display', 'initial'); 43 }, timeout1); 44 setTimeout(function() { 45 self.text(''); 46 self.find('svg').remove(); 47 self.append($checkmarkTemplate.clone()); 48 self.find('svg').css('display', 'initial'); 49 self.find('svg').removeClass('svg--template'); 50 self.addClass('done'); 51 }, timeout1 + timeout2); 52 setTimeout(function() { 53 self.find('svg').remove(); 54 self.text(button_text); 55 self.removeClass('clicked'); 56 self.removeClass('done'); 57 }, timeout1 + timeout2 + timeout3); 58 }, false ); 59 60 }); 61 62}) 63(jQuery);
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.