1// display greet box when document is ready 2jQuery(document).ready(function($){ 3 // set default referrer if none found 4 var ref = "default"; 5 if(document.referrer){ 6 ref = document.referrer; 7 m = ref.match(/^(http:\/\/[^\/]+)/i); 8 if(m){ 9 ref = m[1].replace(".", "_"); 10 } 11 } 12 // send request 13 $.ajax({ 14 type: "GET", 15 url: "index.php", 16 data: "wpgb_public_action=query&visit_delta="+wpgb_get_delta(ref)+"&closed="+wpgb_get_closed(ref)+"&logged_in="+wpgb_get_logged_in()+"&referrer="+encodeURIComponent(document.referrer)+"&url="+encodeURIComponent(document.location)+"&title="+encodeURIComponent(document.title), 17 dataType: "html", 18 success: function(resp) { 19 if(resp != ''){ 20 // show greeting message 21 $("#greet_block").hide().html(resp).fadeIn("def"); 22 // bind close action 23 $("#greet_block_close").click(function(event){ 24 event.preventDefault(); 25 wpgb_set_cookie("wpgb_closed-"+ref,new Date(),wpgb_cookie_exp); 26 wpgb_set_cookie("wpgb_closed-"+ref,new Date(),wpgb_cookie_exp); 27 $("#greet_block").fadeOut("def"); 28 }); 29 // bind search action (if any) 30 $("#greet_search_link").click(function(){ 31 action = $(this).attr("action"); 32 if(action == "show"){ 33 $("#greet_search_results").slideDown(); 34 $(this).attr("action","hide"); 35 $("#greet_search_link_text_show").hide(); 36 $("#greet_search_link_text_hide").show(); 37 $("#greet_search_text_show").hide(); 38 $("#greet_search_text_hide").show(); 39 } 40 else if(action == "hide"){ 41 $("#greet_search_results").slideUp("fast"); 42 $(this).attr("action","show"); 43 $("#greet_search_link_text_show").show(); 44 $("#greet_search_link_text_hide").hide(); 45 $("#greet_search_text_show").show(); 46 $("#greet_search_text_hide").hide(); 47 } 48 }); 49 } 50 } 51 }); 52 // set cookie 53 wpgb_set_cookie("wpgb_visit_last-"+ref,new Date(),wpgb_cookie_exp); 54});
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.