PageSourceSearch

https://weeek.net/js/promo/sliderFeatures.js?v=1790149138

js weeek.net collected 2026-09-24 09:18:10 UTC 2,692 bytes, 81 lines download raw bytes

1(function (document, window) {
2  document.addEventListener('DOMContentLoaded', function () {
3    const featureListItems = document.querySelectorAll(
4      '.promo-features__features-list-item'
5    );
6
7    const contentElements = document.querySelectorAll(
8      '.promo-features__content > *'
9    );
10
11    if (featureListItems.length === 0 || contentElements.length === 0) {
12      return;
13    }
14
15    featureListItems.forEach(function (listItem, featureIndex) {
16      const descriptionElement = listItem.querySelector(
17        '.promo-features__features-list-item-description'
18      );
19
20      if (featureIndex === 0) {
21        listItem.classList.add('active');
22
23        if (descriptionElement) {
24          descriptionElement.style.maxHeight =
25            descriptionElement.scrollHeight + 'px';
26          descriptionElement.style.opacity = '1';
27          descriptionElement.style.paddingTop = '8px';
28        }
29      } else if (descriptionElement) {
30        descriptionElement.style.maxHeight = '0';
31        descriptionElement.style.opacity = '0';
32        descriptionElement.style.paddingTop = '0';
33      }
34    });
35
36    contentElements.forEach(function (element, elementIndex) {
37      element.style.display = elementIndex === 0 ? 'block' : 'none';
38    });
39
40    featureListItems.forEach(function (listItem, featureIndex) {
41      listItem.addEventListener('click', function () {
42        const isActive = listItem.classList.contains('active');
43
44        const descriptionElement = listItem.querySelector(
45          '.promo-features__features-list-item-description'
46        );
47
48        featureListItems.forEach(function (otherListItem) {
49          otherListItem.classList.remove('active');
50
51          const otherDescriptionElement = otherListItem.querySelector(
52            '.promo-features__features-list-item-description'
53          );
54
55          if (otherDescriptionElement) {
56            otherDescriptionElement.style.maxHeight = '0';
57            otherDescriptionElement.style.opacity = '0';
58            otherDescriptionElement.style.paddingTop = '0';
59          }
60        });
61
62        if (!isActive && descriptionElement) {
63          listItem.classList.add('active');
64
65          descriptionElement.style.maxHeight =
66            descriptionElement.scrollHeight + 'px';
67          descriptionElement.style.opacity = '1';
68          descriptionElement.style.paddingTop = '8px';
69        }
70
71        contentElements.forEach(function (contentElement, contentIndex) {
72          if (contentIndex === featureIndex) {
73            contentElement.style.display = 'block';
74          } else {
75            contentElement.style.display = 'none';
76          }
77        });
78      });
79    });
80  });
81})(document, window);

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.