{"publisher":"WESWOO","measured_on":"2026-11-24","id":"content-slider","url":"https://www.weswoo.com/guides/effects/gallery/?effect=content-slider#content-slider","runtime":"Chrome 157.0.8103.79","method":{"zh":"WESWOO 在独立 Chrome 窗口载入本页公开示例的 HTML、CSS 和 JavaScript，预览高 700 px。两种宽度下都单独测试默认偏好和减少动态效果。","en":"WESWOO loaded this example’s published HTML, CSS and JavaScript in standalone Chrome at 700 px viewport height. Both motion preferences were tested at each width."},"action":{"zh":"从第一页直接选第三个圆点，再选第一个，读取两次状态播报。","en":"Go directly to the third dot and back to the first. Read both status messages."},"source_sha256":{"html":"d97fcca8a216c84692261d5f4c0ab2b802717491750b875310ff97dfbb2611dc","css":"83e35e59c0b2c7ab9b8771dd553417e2e41d85c0f82d5c62efc8d13c4534c0c3","js":"be6c5c6ef5d7be82c558b08e73d428e92df772447ecfb5cbf574d18c34bf33a5"},"viewport_height_px":700,"readings":{"908/default":"Slide 3 of 3. No automatic advancement. → Slide 1 of 3. No automatic advancement.","908/reduce":"Slide 3 of 3. No automatic advancement. → Slide 1 of 3. No automatic advancement.","316/default":"Slide 3 of 3. No automatic advancement. → Slide 1 of 3. No automatic advancement.","316/reduce":"Slide 3 of 3. No automatic advancement. → Slide 1 of 3. No automatic advancement."},"replay_function":"async function testEffect({id,js,reduced}){\n const root=document.querySelector('.fx'),url=URL.createObjectURL(new Blob([js],{type:'text/javascript'}));\n const {mountEffect}=await import(url),ctl=mountEffect(root,{reducedMotion:reduced});\n const el=s=>root.querySelector(s),all=s=>[...root.querySelectorAll(s)],txt=s=>el(s).textContent.trim(),press=(s,n=0)=>all(s)[n].click();\n const wait=ms=>new Promise(r=>setTimeout(r,ms)),frames=()=>new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));\n const scroll=async(s,n)=>{const box=el(s);box.scrollTop=n??box.scrollHeight;await frames();return box.scrollTop;};\n const style=(s,k)=>getComputedStyle(el(s)).getPropertyValue(k).trim(),trans=(s,key)=>{const m=style(s,'transform');return m==='none'?0:Math.round(new DOMMatrix(m)[key]*10)/10;};\n const range=(s,v)=>{const node=el(s);node.value=v;node.dispatchEvent(new Event('input',{bubbles:true}));};\n const seq=(...v)=>v.map(i=>String(i).replace(/\\s+/g,' ').trim()).join(' → ');\n const attr=(s,k)=>el(s).getAttribute(k);\n const animations=()=>document.getAnimations().filter(a=>a.playState==='running').length;\n const toggles=async(sel,read)=>{const a=read();press(sel);await frames();const b=read();press(sel);await frames();return seq(a,b,read());};\n ctl.resume();await frames();let result;\n try{switch(id){\n case 'content-slider':{const sel='.slide-dots button';press(sel,2);await wait(550);const last=txt('[role=status]');press(sel,0);await wait(550);result=seq(last,txt('[role=status]'));break;}\n default:throw Error(id);}\n return result;\n }finally{ctl.destroy();URL.revokeObjectURL(url);}\n}","usage":"Load the published HTML and CSS in a fresh Chrome page, emulate the specified width and reduced-motion preference, then call the function in the page with {id,js,reduced}. The js argument is the published ES module source. Copy the HTML, CSS and JavaScript from the code tab at the Chinese source URL in this record.","source_locale":"zh-Hans","regression_check":{"condition":"Resume, pause, then manually select slide three. Read its selected index.","runtime":"Chrome 157.0.8103.79","previous_source_sha256":"69c2b0640156a531882d5bece20edf31fca7fbf1dea248694d78007a42c4553d","previous_result":1,"current_source_sha256":"be6c5c6ef5d7be82c558b08e73d428e92df772447ecfb5cbf574d18c34bf33a5","current_result":3}}