PageSourceSearch

https://www.hologic.es/themes/custom/hologic/global/js/us-ous-content.js?tm4wcr

js hologic.es collected 2026-10-08 20:33:39 UTC 1,546 bytes, 52 lines download raw bytes

1/**
2 * @file
3 */
4
5(function ($, Drupal, drupalSettings, once) {
6
7  'use strict';
8
9  /**
10   * Hide/display content based on geolocation of user for Product 3.0.
11   */
12  Drupal.behaviors.HologicUsOusContent = {
13    attach: function (context, settings) {
14      $(once('hologic-us-ous-content', '#us-ous-content')).each(function() {
15        var $wrapper = $(this);
16
17        if (!settings.us_ous_tabs.show) {
18          $('.coh-accordion-tabs-nav', $wrapper).first().hide();
19        }
20      });
21    }
22  };
23
24  /**
25   * Toggle US/OUS content by clicking on specific buttons component.
26   */
27   Drupal.behaviors.HologicUsOusToggle = {
28    attach: function (context, settings) {
29      // This is attached after Drupal.behaviors.CohesionAccordionTabs sometimes
30      $(once('hologic-us-ous-toggle', '#us-ous-content', context)).each(function() {
31        const $usOusWrapper = $(this);
32        const $usOusTabs = $('ul.coh-accordion-tabs-nav', $usOusWrapper).first();
33
34        $(once('hologic-us-ous-toggle', '.toggle-usa', $usOusWrapper.get(0))).each(function() {
35          $(this).on('click', (e) => {
36            e.preventDefault();
37            $('li:first-child > a', $usOusTabs).trigger('click');
38          });
39        });
40
41        $(once('hologic-us-ous-toggle', '.toggle-worldwide', $usOusWrapper.get(0))).each(function() {
42          $(this).on('click', (e) => {
43            e.preventDefault();
44            $('li:last-child > a', $usOusTabs).trigger('click');
45          });
46        });
47      });
48
49    }
50  };
51
52})(jQuery, Drupal, drupalSettings, 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.