PageSourceSearch

https://www.purina.it/modules/custom/trim_the_tail_components/nppe…/text-image/text-image.js?tmmssq

js purina.it collected 2026-10-09 21:31:31 UTC 1,680 bytes, 41 lines download raw bytes

1(function ($, Drupal, once) {
2  Drupal.behaviors.componentTextImage = {
3    attach: function (context, settings) {
4      const $components = $(context).find('.component--text-image');
5      if (!$components.length) return;
6
7      $(once('component-text-image', $components, context)).each(function () {
8        const $component = $(this);
9
10        const $numberIndicator = $component.find(".current-page");
11        const $indicatorTotalNumber = $component.find('.indicator-total-number');
12        const $carouselArrows = $component.find('.carousel-control');
13
14        // Display slider indicators when there is more than one slide.
15        if ($component.find('.carousel-indicators .indicator').length > 1) {
16          $component.find('.carousel-indicators').addClass('show');
17          $component.find('.carousel-controls').addClass('show');
18        }
19
20        // Manage carousel number indicators
21        $component.on('slid.bs.carousel', function (event) {
22          $numberIndicator.text(event.to + 1);
23          setIndicatorHeight();
24        });
25
26        // Display the numbers indicator under the image in desktop.
27        function setIndicatorHeight() {
28          if (window.matchMedia('(min-width: 1140px)').matches) {
29            const mediaHeight = $component.find('.carousel-item.active picture').outerHeight();
30            $indicatorTotalNumber[0].style.top = (mediaHeight + $indicatorTotalNumber.outerHeight() - 4) + "px";
31
32            // Position the arrows vertically in the center of the image/video
33            $carouselArrows.css('top', mediaHeight / 2 + 'px');
34          }
35        }
36
37        setIndicatorHeight();
38      });
39    }
40  };
41})(jQuery, Drupal, once);

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.