PageSourceSearch

https://purelyautomated.com/assets/pages.js

js purelyautomated.com collected 2026-09-24 14:17:18 UTC 1,507 bytes, 41 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2  // FAQ accordion
3  document.querySelectorAll('.faq-q').forEach(q => {
4    const toggle = () => {
5      const fi = q.parentElement;
6      const isOpen = fi.classList.contains('open');
7      document.querySelectorAll('.faq-item.open').forEach(i => {
8        i.classList.remove('open');
9        i.querySelector('.faq-q').setAttribute('aria-expanded', 'false');
10      });
11      if (!isOpen) {
12        fi.classList.add('open');
13        q.setAttribute('aria-expanded', 'true');
14      }
15    };
16    q.addEventListener('click', toggle);
17    q.addEventListener('keydown', e => {
18      if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); }
19    });
20  });
21
22  // Mobile nav
23  const hamBtn = document.getElementById('hamBtn');
24  const mobNav = document.getElementById('mob-nav');
25  const mobClose = document.getElementById('mobClose');
26  if (hamBtn && mobNav && mobClose) {
27    hamBtn.addEventListener('click', () => {
28      mobNav.classList.add('open');
29      hamBtn.setAttribute('aria-expanded', 'true');
30    });
31    mobClose.addEventListener('click', closeMob);
32    document.addEventListener('keydown', e => { if (e.key === 'Escape') closeMob(); });
33    document.querySelectorAll('#mob-nav a').forEach(a => a.addEventListener('click', closeMob));
34  }
35  function closeMob() {
36    if (!mobNav) return;
37    mobNav.classList.remove('open');
38    if (hamBtn) hamBtn.setAttribute('aria-expanded', 'false');
39  }
40  window.closeMob = closeMob;
41});

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.