PageSourceSearch

https://sean-astin.net/wp-content/themes/sean-astin_net/assets/js/main.js?ver=6.0.0

js sean-astin.net collected 2026-09-25 10:29:16 UTC 1,576 bytes, 36 lines download raw bytes

1/* WC2026 v6 — Minimal JS */
2(function(){
3    /* Mobile Nav Toggle */
4    var btn=document.getElementById('mobile-toggle'),nav=document.getElementById('main-nav');
5    if(btn&&nav){btn.addEventListener('click',function(){nav.classList.toggle('open');btn.textContent=nav.classList.contains('open')?'✕':'☰'});}
6
7    /* Header Scroll Effect */
8    var header=document.getElementById('site-header');
9    if(header){
10        var last=0;
11        window.addEventListener('scroll',function(){
12            var y=window.pageYOffset;
13            header.style.boxShadow=y>50?'0 2px 12px rgba(0,0,0,.4)':'none';
14            last=y;
15        },{passive:true});
16    }
17
18    /* Smooth Anchor Scroll */
19    document.querySelectorAll('a[href^="#"]').forEach(function(a){
20        a.addEventListener('click',function(e){
21            var t=document.querySelector(this.getAttribute('href'));
22            if(t){e.preventDefault();t.scrollIntoView({behavior:'smooth',block:'start'});}
23        });
24    });
25
26    /* Fade-in on Scroll */
27    if('IntersectionObserver' in window){
28        var obs=new IntersectionObserver(function(entries){
29            entries.forEach(function(e){if(e.isIntersecting){e.target.style.opacity='1';e.target.style.transform='translateY(0)';obs.unobserve(e.target);}});
30        },{threshold:0.1});
31        document.querySelectorAll('.article-card,.sidebar-widget,.inline-cta').forEach(function(el){
32            el.style.opacity='0';el.style.transform='translateY(12px)';el.style.transition='opacity .4s,transform .4s';
33            obs.observe(el);
34        });
35    }
36})();

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.