1(function ($) { 2 "use strict"; 3 4 if(hashbar_analytical.enable_analytics == ''){ 5 return; 6 } 7 8 $(window).on('load',function(){ 9 notification_bars(); 10 }); 11 12 function notification_bars(){ 13 var $notificationBars = $('.hthb-notification'); 14 $notificationBars.each(function(){ 15 var data = {}; 16 data.post_id = $(this).attr('id').split('-')[1]; 17 data.clicked = false; 18 data.view = true; 19 20 if($(this).hasClass('hthb-state--open')){ 21 analytics(data); 22 } 23 24 $(this).find('.hthb-open-toggle').on('click',function(){ 25 data.clicked = false; 26 data.view = true; 27 analytics(data); 28 }); 29 30 $(this).find('.ht_btn').on('click',function(){ 31 data.clicked = true; 32 data.view = false; 33 analytics(data); 34 }); 35 36 $(this).find('.ht-promo-button').on('click',function(){ 37 data.clicked = true; 38 data.view = false; 39 analytics(data); 40 }); 41 }); 42 } 43 44 function analytics(data){ 45 $.ajax({ 46 type: "POST", 47 url: hashbar_analytical.ajaxurl, 48 data: { 49 action: "hashbar_analytics", 50 nonce: data.nonce, 51 id: data.post_id, 52 clicked: data.clicked, 53 view: data.view, 54 nonce: hashbar_analytical.nonce_key, 55 }, 56 success: function (response) { 57 //response 58 }, 59 }); 60 } 61 62})(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.