Files
sase.tr/scripts/emex-debug-dims.js
Sase Dev 4a06ba5fdb feat: Ford legacy support, EMEX browser pooling, collapsible sidebar
- Add PL24 Ford legacy service for fordt_parts architecture
- Refactor EMEX to use persistent browser pool instead of per-call instances
- Make vehicle decode resilient: fallback to PL24 when Corgi doesn't recognize VIN
- Add collapsible sidebar with persistent user preference
- Improve brand access guard and categories service
- Add debug/test scripts for VIN e2e testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:25:06 +00:00

44 lines
1.9 KiB
JavaScript

#!/usr/bin/env node
const puppeteer = require('puppeteer');
const QUICK_URL = 'https://emexdwc.ae/QuickDetails.aspx?c=SUBARU201802&gid=11884&vid=0&ssd=$*KwGdqbit1suR0ubYx-jFj8XR8fbomJ-emYinlNza6f7m4Nf0houS7-TvmejqkOewy9Ponp-Rlp6c1YC4n43Hi5KN5O-asbzd4-ian-ien5LPyNGNgovNjZSYmsXOyI3Xi5KN6IvWAAAAAHBDYDE=$';
(async () => {
const browser = await puppeteer.launch({ headless: 'new', args: ['--no-sandbox'] });
const page = await browser.newPage();
await page.setViewport({ width: 1400, height: 900 });
await page.goto(QUICK_URL, { waitUntil: 'networkidle2', timeout: 30000 });
await new Promise(r => setTimeout(r, 2000));
const unitUrl = await page.evaluate(() => {
const link = document.querySelector('a[href*="Unit.aspx"]');
return link ? link.href : null;
});
await page.goto(unitUrl, { waitUntil: 'networkidle2', timeout: 30000 });
await new Promise(r => setTimeout(r, 3000));
const info = await page.evaluate(() => {
const img = document.querySelector('img.dragger[src*="laximo"]');
if (!img) return { error: 'no dragger img' };
return {
naturalWidth: img.naturalWidth,
naturalHeight: img.naturalHeight,
offsetWidth: img.offsetWidth,
offsetHeight: img.offsetHeight,
clientWidth: img.clientWidth,
clientHeight: img.clientHeight,
// Also check the image container
parentTag: img.parentElement?.tagName,
parentClass: img.parentElement?.className,
parentWidth: img.parentElement?.offsetWidth,
parentHeight: img.parentElement?.offsetHeight,
// Scale factor
scaleX: img.naturalWidth / img.offsetWidth,
scaleY: img.naturalHeight / img.offsetHeight,
};
});
console.log(JSON.stringify(info, null, 2));
await browser.close();
})();