1$(() => { 2 $('.__survey-bar').each(function() { 3 const dv = $(this); 4 if (!dv.find('input[name="__survey-bar-can-submit"]')[0]) { 5 return; 6 } 7 dv.find('form').submit(function(event) { 8 event.preventDefault(); 9 10 const fm = $(this); 11 if (fm.attr('__SUBMITTING') === 'Y') { 12 return false; 13 } 14 // Cover the bar div 15 fm.attr('__SUBMITTING', 'Y'); 16 fm.find('.survey-bar-cover b').hide(); 17 fm.find('.survey-bar-cover .fa-refresh').show(); 18 fm.find('.survey-bar-cover').show(); 19 $.post(fm.attr('action'), fm.serialize(), function(json) { 20 if (json.success) { 21 fm.parent().html(json.html); 22 $('html, body').animate({ scrollTop: dv.offset().top - 48 }, 333); 23 return; 24 } 25 // Show message and uncover 26 fm.attr('__SUBMITTING', 'N'); 27 fm.find('.survey-bar-cover .fa-refresh').hide(); 28 fm.find('.survey-bar-cover b').text(json.message).show(); 29 setTimeout(function() { 30 fm.find('.survey-bar-cover').hide(); 31 }, 3000); 32 }, 'json').fail(function() { 33 // Show message and uncover 34 fm.attr('__SUBMITTING', 'N'); 35 fm.find('.survey-bar-cover .fa-refresh').hide(); 36 fm.find('.survey-bar-cover b').text(fm.find('.survey-bar-cover b').attr('data-df-error')).show(); 37 setTimeout(function() { 38 fm.find('.survey-bar-cover').hide(); 39 }, 3000); 40 }); 41 42 return false; 43 }).find('input[type=submit]').prop('disabled', false); 44 }); 45});
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.