Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s

This commit is contained in:
huncode committed 2026-10-27 15:19:49 +03:00
1 parent 99c848189e
commit 12562baeb5
2040 files changed
+184656 -181

No files matched your search

@@ -0,0 +1 @@
async(page)=>{let out={};for(const [id,slug,sel]of[['d','пишем-аналог-функции-php-preg_match_all-на-языке-прог','pre'],['ctfe','новый-движок-ctfe','.table-scroll']]){await page.goto('http://127.0.0.1:50480/articles/'+encodeURIComponent(slug)+'/');await page.setViewportSize({width:320,height:1000});await page.getByLabel('Тема',{exact:true}).selectOption('dark');let loc=page.locator(sel);if(id==='d'){let sizes=await loc.evaluateAll(es=>es.map(e=>e.textContent.length));loc=loc.nth(sizes.indexOf(Math.max(...sizes)));}else loc=loc.first();await loc.scrollIntoViewIfNeeded();out[id]=await loc.evaluate(e=>({tag:e.tagName,role:e.getAttribute('role'),tabIndex:e.tabIndex,client:e.clientWidth,scroll:e.scrollWidth,lines:e.textContent.split('\n').length}));await loc.focus();for(let i=0;i<24;i++)await page.keyboard.press('ArrowRight');await page.waitForTimeout(250);out[id].after=await loc.evaluate(e=>({left:e.scrollLeft,focus:document.activeElement===e}));await loc.scrollIntoViewIfNeeded();await page.screenshot({path:'/tmp/progcode-ds-cm-f5/'+id+'-320-dark-scroll-region.png'});}return out;}