Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s
Build and deploy / deploy (push) Successful in 2m39s
This commit is contained in:
1 parent
99c848189e
commit
12562baeb5
2040 files changed
+184656
-181
No files matched your search
@@ -0,0 +1 @@
|
||||
async(page)=>{let o={};await page.setViewportSize({width:390,height:1000});for(const [id,slug]of[['a2','о-tilix-и-d-интервью-с-геральдом-нанном'],['a7','dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол'],['a10','особенности-vibe-d'],['a13','привет-мир']]){const res=await page.goto('http://127.0.0.1:65019/articles/'+encodeURIComponent(slug)+'/');if(res.status()===404){o[id]={status:404};continue;}await page.getByLabel('Тема',{exact:true}).selectOption('dark');await page.locator('.article-content').scrollIntoViewIfNeeded();o[id]={status:res.status(),endText:(await page.locator('.article-content').innerText()).slice(-500)};await page.locator('.article-content').evaluate(e=>window.scrollTo({top:e.getBoundingClientRect().bottom+window.scrollY-750,behavior:'instant'}));await page.waitForTimeout(300);await page.screenshot({path:'/tmp/progcode-ds-content/'+id+'-390-dark-end.png'});if(id==='a2'){const a=page.locator('details a').nth(4);await a.click();await page.waitForTimeout(1200);o[id].anchor=await page.evaluate(()=>({hash:location.hash,y:document.querySelector(location.hash).getBoundingClientRect().top}));}}return o;}
|
||||
Reference in new issue
Block a user