PageSourceSearch

https://huangcancan-xbc.github.io/js/imgloaded.js

js huangcancan-xbc.github.io collected 2026-10-03 09:18:49 UTC 2,428 bytes, 1 lines download raw bytes

1!function(){class e{constructor(e,t){this.smallSrc=e,this.largeSrc=t,this.initTpl(),this.container.addEventListener("animationend",()=>{this.smallStage.style.display="none"},{once:!0})}initTpl(){this.container=document.createElement("div"),this.smallStage=document.createElement("div"),this.largeStage=document.createElement("div"),this.smallImg=new Image,this.largeImg=new Image,this.container.className="pl-container",this.smallStage.className="pl-img pl-blur",this.largeStage.className="pl-img",this.container.appendChild(this.smallStage),this.container.appendChild(this.largeStage),this.smallImg.onload=this._onSmallLoaded.bind(this),this.largeImg.onload=this._onLargeLoaded.bind(this)}progressiveLoad(){this.smallImg.src=this.smallSrc,this.largeImg.src=this.largeSrc}_onLargeLoaded(){this.largeStage.classList.add("pl-visible"),this.largeStage.style.backgroundImage=`url('${this.largeSrc}')`}_onSmallLoaded(){this.smallStage.classList.add("pl-visible"),this.smallStage.style.backgroundImage=`url('${this.smallSrc}')`}}const t={light:{smallSrc:"https://blog.xiowo.net/img/bg.svg",largeSrc:"https://blog.xiowo.net/img/bg.svg",mobileSmallSrc:"https://blog.xiowo.net/img/bg.svg",mobileLargeSrc:"https://blog.xiowo.net/img/bg.svg",enableRoutes:["/"]}
1,dark:{smallSrc:"https://blog.xiowo.net/img/bg-dark.jpg",largeSrc:"https://blog.xiowo.net/img/bg-dark.jpg",mobileSmallSrc:"https://blog.xiowo.net/img/bg-dark.jpg",mobileLargeSrc:"https://blog.xiowo.net/img/bg-dark.jpg",enableRoutes:["/"]}},a=()=>document.documentElement.getAttribute("data-theme");let l=a();function i(t){const a=document.querySelector(".pl-container");a&&a.remove();const l=document.getElementById("page-header");l&&l.classList.contains("full_page")&&((t,a)=>{console.log("执行渐进背景替换");const l=window.matchMedia("(max-width: 767px)").matches,i=new e(l?t.mobileSmallSrc:t.smallSrc,l?t.mobileLargeSrc:t.largeSrc);a.children[0]&&a.insertBefore(i.container,a.children[0]),i.progressiveLoad()})(t,l)}i(t[l]),new MutationObserver(e=>{e.forEach(e=>{"data-theme"===e.attributeName&&"/"===location.pathname&&(()=>{const e=a(),l=t[e];i(l),document.addEventListener("DOMContentLoaded",function(){i(l)}),document.addEventListener("pjax:complete",function(){!function(e){const t=document.getElementById("page-header");t&&t.classList.contains("full_page")&&i(e)}(l)})})()})}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}();

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.