PageSourceSearch

https://www.stellarindustries.com/wp-content/themes/stellar-industries/scripts/tabs.js?ver=1762879458

js stellarindustries.com collected 2026-10-04 09:24:31 UTC 2,273 bytes, 76 lines download raw bytes

1jQuery(function($) {
2  // Deep linking
3  let url = location.href.replace(/\/$/, '');
4  if (location.hash) {
5    const hash = url.split('#');
6    const currentTab = document.querySelector('.tabs-page .nav-tabs [data-bs-target="#' + hash[1] + '"]');
7    const curTab = new bootstrap.Tab(currentTab);
8
9    curTab.show();
10    url = location.href.replace(/\/#/, '#');
11    history.replaceState(null, null, url);
12  }
13
14  // change url based on selected tab
15  const selectableTabList = [].slice.call(document.querySelectorAll('.tabs-page [data-bs-toggle="tab"]'));
16  selectableTabList.forEach((selectableTab) => {
17    const selTab = new bootstrap.Tab(selectableTab);
18    selectableTab.addEventListener('click', function () {
19      var newUrl;
20      const hash = selectableTab.getAttribute('data-bs-target');
21      newUrl = url.split('#')[0] + hash;
22      history.replaceState(null, null, newUrl);
23    });
24  });
25});
26
27// Product Literature Page Tabs
28document.addEventListener('DOMContentLoaded', function() {
29  const links = document.querySelectorAll('.product-lit-link');
30  const sections = document.querySelectorAll('.product-lit-section');
31
32  function showSectionFromHash() {
33    const hash = window.location.hash.substring(1); // remove '#'
34    let targetFound = false;
35
36    sections.forEach(section => {
37      if (section.id === hash) {
38        section.classList.remove('hidden');
39        targetFound = true;
40      } else {
41        section.classList.add('hidden');
42      }
43    });
44
45    links.forEach(link => {
46      if (link.getAttribute('href') === '#' + hash) {
47        link.classList.add('active');
48      } else {
49        link.classList.remove('active');
50      }
51    });
52
53    // Default to top section
54    if (!hash || !targetFound) {
55      sections.forEach((section, i) => {
56        section.classList.toggle('hidden', i !== 0);
57      });
58      links.forEach((link, i) => {
59        link.classList.toggle('active', i === 0);
60      });
61    }
62  }
63
64  links.forEach(link => {
65    link.addEventListener('click', function(e) {
66      e.preventDefault();
67      const targetId = this.getAttribute('href');
68      history.pushState(null, '', targetId);
69      showSectionFromHash();
70    });
71  });
72
73  showSectionFromHash();
74
75  window.addEventListener('hashchange', showSectionFromHash);
76});

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.