PageSourceSearch

https://www.coa.edu/wp-content/themes/coatlantic/dist/js/component-table-scroll-bnYXt6AZ.js

js coa.edu collected 2026-09-24 08:34:10 UTC 2,420 bytes, 16 lines download raw bytes

1function S(){document.querySelectorAll(".wp-block-table").forEach(e=>{if(window.innerWidth>=768)return;const l=e.querySelector("table");if(!l)return;const t=document.createElement("div");t.className="table-scroll-wrapper",t.style.cssText=`
2      width: 100%;
3      overflow-x: auto;
4      -webkit-overflow-scrolling: touch;
5    `,l.parentNode.insertBefore(t,l),t.appendChild(l),e.style.position="relative",e.style.overflow="visible";const d=w("right"),L=w("left");e.appendChild(d),e.appendChild(L);const n=document.createElement("div");n.className="table-scrollbar";const i=document.createElement("div");i.className="table-scrollbar__thumb",n.appendChild(i),e.appendChild(n);let m=null,h=!1,g=0,E=0;function v(){n.classList.add("is-visible"),clearTimeout(m),m=setTimeout(()=>{h||n.classList.remove("is-visible")},1500)}function f(){const{scrollLeft:u,scrollWidth:c,clientWidth:s}=t;if(c<=s){n.classList.remove("is-visible");return}const p=s/c,a=Math.max(p*s,30),r=s-a,y=u/(c-s)*r;i.style.width=a+"px",i.style.left=y+"px"}function b(){N(t,d,L),f()}t.addEventListener("scroll",()=>{b(),v()}),e.addEventListener("mouseenter",()=>{t.scrollWidth>t.clientWidth&&(f(),v())}),i.addEventListener("mousedown",u=>{u.preventDefault(),h=!0,g=u.clientX,E=t.scrollLeft,i.style.cursor="grabbing";const c=p=>{const{scrollWidth:a,clientWidth:r}=t,x=r/a,y=Math.max(x*r,30),T=r-y,W=a-r,C=(p.clientX-g)/T*W;t.scrollLeft=E+C},s=()=>{h=!1,i.style.cursor="",document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),m=setTimeout(()=>{n.classList.remove("is-visible")},1500)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",s)}),b(),window.addEventListener("resize",b),t.scrollWidth>t.clientWidth&&(f(),v())})}function w(o){const e=document.createElement("div");e.className=`table-scroll-indicator-${o}`;const l=o==="right";return e.style.cssText=`
6    position: absolute;
7    top: 0;
8    ${o}: 0;
9    bottom: 0;
10    width: 2rem;
11    background: linear-gradient(to ${l?"left":"right"}, hsla(43, 45%, 98%, 1), transparent);
12    pointer-events: none;
13    z-index: 1;
14    opacity: ${l?"1":"0"};
15    transition: opacity 0.3s ease;
16  `,e}function N(o,e,l){const t=o.scrollLeft+o.clientWidth>=o.scrollWidth-10,d=o.scrollLeft>10;e.style.opacity=t?"0":"1",l.style.opacity=d?"1":"0"}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S();export{S as initTableScroll};

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.