1$(function () { 2 3 $('body').delegate('.thumb-rating .rating-form button', 'click', function(event) { 4 event.preventDefault() 5 const that = $(this) 6 const form = that.closest('form') 7 8 that.blur() 9 const action = that.attr('name') 10 const upResults = form.find('.total-thumbs-up .tally-total') 11 const downResults = form.find('.total-thumbs-down .tally-total') 12 const auth_key = form.find('input[name="_authenticator"]').val() 13 14 if (form) { 15 $.post(form.attr("action"), action + '=FOOBAR&ajax=1&_authenticator=' + auth_key, function(data) { 16 upResults.text(data.ups); 17 downResults.text(data.downs); 18 19 form.find('.thumbs-down').removeClass('selected') 20 form.find('.thumbs-up').removeClass('selected') 21 if (data.action == 'like') { 22 form.find('.thumbs-up').addClass('selected') 23 } else if (data.action == 'dislike') { 24 form.find('.thumbs-down').addClass('selected') 25 } 26 27 }, 'json'); 28 } 29 }) 30 31})
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.