PageSourceSearch

https://portfolio.gateaux-09suntan.workers.dev/thumbhash-loader.js?v=skel10

js portfolio.gateaux-09suntan.workers.dev collected 2026-10-03 08:09:24 UTC 1,630 bytes, 1 lines download raw bytes

1import{thumbHashToDataURL as h}from"./vendor/thumbhash.min.js";const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=6e3,m=0;function f(o){const n=atob(o),a=new Uint8Array(n.length);for(let c=0;c<n.length;c++)a[c]=n.charCodeAt(c);return a}function b(o){return o.replace(/\/cdn-cgi\/image\/[^/]+\//,"/")}function y(o){const n=o.querySelector("img");if(!n)return null;const a=n.complete&&n.naturalWidth>0,c=!!o.closest(".card-wrap");if(!a)try{const s=f(o.dataset.thumbhash);o.style.setProperty("--thumbhash-bg",`url("${h(s)}")`)}catch{}return{isCardMockup:c,cached:a}}function i(){const o=document.querySelectorAll("span.thumb-wrap[data-thumbhash]"),n=new Set,a=e=>{e.style.removeProperty("--thumbhash-bg")},c=e=>{n.delete(e)&&e.classList.remove("thumb-wrap--pending")},s=(e,t)=>{const r=t.currentSrc||t.src,d=b(r);d!==r&&t.dataset.rawFallback!=="1"&&(t.dataset.rawFallback="1",t.addEventListener("error",()=>s(e,t),{once:!0}),t.removeAttribute("srcset"),t.src=d)};o.forEach(e=>{const t=y(e);if(!t)return;const r=e.querySelector("img");t.cached||(r.addEventListener("load",()=>a(e),{once:!0}),r.addEventListener("error",()=>s(e,r),{once:!0}),r.complete&&r.naturalWidth===0&&s(e,r)),t.isCardMockup&&!u&&(e.classList.add("thumb-wrap--pending"),n.add(e))}),!u&&(document.addEventListener("entrance:done",e=>{const t=e.target;if(!(t instanceof Element))return;const r=t.querySelectorAll("span.thumb-wrap[data-thumbhash]");r.length&&setTimeout(()=>r.forEach(d=>c(d)),m)}),setTimeout(()=>{Array.from(n).forEach(e=>c(e))},l))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i();

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.