PageSourceSearch

https://www.triodos.co.uk/webfiles/1790847319764/static/js/piwik-automatic-article-overview.js

js triodos.co.uk collected 2026-10-01 10:29:58 UTC 1,151 bytes, 29 lines download raw bytes

1function findAncestor(element, clazz) {
2    while (!element.classList.contains(clazz)) {
3        element = element.parentElement;
4    }
5    return element;
6}
7var timer = null;
8function piwikScrollListener(event) {
9    if (timer !== null) {
10        clearTimeout(timer);
11    }
12    timer = setTimeout(function () {
13        var baseStrip = findAncestor(event.target, "base-strip");
14        var titleElement = baseStrip.querySelector("h1");
15        var title = titleElement ? titleElement.textContent : "";
16        window.dataLayer = window.dataLayer || [];
17        window.dataLayer.push(
18            {moreArticlesLoadedTitle: title},
19            {moreArticlesLoadedContext: event.target.getAttribute("data-contextaware")},
20            {moreArticlesLoadedSuperTitle: event.target.getAttribute("data-supertitlecategory")},
21            {event: "moreArticlesLoaded"});
22    }, 250);
23}
24var automaticArticles = document.querySelectorAll(".automatic-article > ul");
25if (automaticArticles.length > 0) {
26    for (let i = 0, len = automaticArticles.length; i < len; i++) {
27        automaticArticles[i].addEventListener('scroll', piwikScrollListener, false);
28    }
29}

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.