1(function ($) { 2 3$(document).ready(function() { 4 5 // Attach mousedown, keyup, touchstart events to document only and catch 6 // clicks on all elements. 7 $(document.body).bind("mousedown keyup touchstart", function(event) { 8 9 // Catch the closest surrounding link of a clicked element. 10 $(event.target).closest("a,area").each(function() { 11 12 if (Drupal.settings.piwik.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) { 13 // Mailto link clicked. 14 _paq.push(["trackEvent", "Mails", "Click", this.href.substring(7)]); 15 } 16 17 }); 18 }); 19 20 // Colorbox: This event triggers when the transition has completed and the 21 // newly loaded content has been revealed. 22 if (Drupal.settings.piwik.trackColorbox) { 23 $(document).bind("cbox_complete", function () { 24 var href = $.colorbox.element().attr("href"); 25 if (href) { 26 _paq.push(["setCustomUrl", href]); 27 _paq.push(["trackPageView"]); 28 } 29 }); 30 } 31 32}); 33 34})(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.