1$(function(){$('form#new_comment').on('submit',function(){comments.postComment();return false;});$('#show_all_comments').on('click',function(){comments.showAllComments();return false;});});var comments={updateComments:function(comments_html){$('ul.comments').html(comments_html);},handleAjaxError:function(data){if(data.message){alert(data.message);}else{alert('There was an error processing your request.');}},postComment:function(callback){var comment=$('textarea#comment').val();if(comment.length==0){return;} 2$.ajax({url:$('form#new_comment').attr('ajax-action'),type:'post',dataType:'json',data:{comment:comment,page_id:$('input#page_id').val()}}).done(function(data){if(data.success==false){if(publicLogin.lb_heading==''&&publicLogin.lb_subheading==''){publicLogin.lb_heading=$('#plp_login_box .plp_login_mainhead').html();publicLogin.lb_subheading=$('#plp_login_box .note').html();} 3$('#plp_login_box .plp_login_mainhead').html('Create a Login to Comment');$('#plp_login_box .note').html('');$('#plp_login_box #account_created h5').html('Success! Youâre now logged in to Mind Tools.');publicLogin.comment_clicked=false;publicLogin.positionLightboxImage();publicLogin.comment_clicked=true;return false;}else if(data.comments_html){$('form#new_comment').slideUp(300,function(){comments.updateComments(data.comments_html);if(data.approval_required==true){alert('Your comment has been submitted and is awaiting approval.');}else{$('span.count').text(parseInt($('span.count').text())+ 1);} 4if(typeof(callback)!='undefined'){callback();}});}});},showAllComments:function(){$.ajax({url:'/pages/comments/getComments/'+ $('input#page_id').val(),type:'get',dataType:'json'}).done(function(data){if(data.success==false){comments.handleAjaxError(data);}else if(data.comments_html){$('#show_all_comments').fadeOut(300,function(){comments.updateComments(data.comments_html);});}});}}
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.