PageSourceSearch

https://uclouvain.be/modules/contrib/matomo/js/matomo.js?tikpb5

js uclouvain.be collected 2026-09-24 07:45:59 UTC 1,472 bytes, 46 lines download raw bytes

1(($, drupalSettings, _paq) => {
2  /**
3   * Default event binding.
4   *
5   * Attach mousedown, keyup, touchstart events to document only and catch
6   * clicks on all elements.
7   */
8  function defaultBind() {
9    $(document.body).on('mousedown keyup touchstart', (event) => {
10      // Catch the closest surrounding link of a clicked element.
11      $(event.target)
12        .closest('a,area')
13        // eslint-disable-next-line func-names
14        .each(function () {
15          if (
16            drupalSettings.matomo.trackMailto &&
17            // eslint-disable-next-line no-jquery/no-is
18            $(this).is("a[href^='mailto:'],area[href^='mailto:']")
19          ) {
20            // Mailto link clicked.
21            _paq.push(['trackEvent', 'Mails', 'Click', this.href.substring(7)]);
22          }
23        });
24    });
25  }
26
27  // eslint-disable-next-line no-jquery/no-ready
28  $(document).ready(() => {
29    defaultBind();
30
31    // Colorbox: This event triggers when the transition has completed and the
32    // newly loaded content has been revealed.
33    if (drupalSettings.matomo.trackColorbox) {
34      $(document).on('cbox_complete', () => {
35        const href = $.colorbox.element().attr('href');
36        if (href) {
37          _paq.push(['setCustomUrl', href]);
38          if (drupalSettings.matomo.disableCookies) {
39            _paq.push(['disableCookies']);
40          }
41          _paq.push(['trackPageView']);
42        }
43      });
44    }
45  });
46})(jQuery, drupalSettings, _paq);

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.