diff options
Diffstat (limited to 'tools/emoji-test.js')
| -rw-r--r-- | tools/emoji-test.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/emoji-test.js b/tools/emoji-test.js index d661329..c91cec0 100644 --- a/tools/emoji-test.js +++ b/tools/emoji-test.js @@ -4,7 +4,7 @@ // installs the pack. Read-only: nothing is posted. // // Run: bun tools/emoji-test.js [screenshot.png] -import puppeteer from 'puppeteer-core'; +import puppeteer from './puppeteer.js'; import { generateMnemonic } from '@scure/bip39'; import { wordlist } from '@scure/bip39/wordlists/english'; import { buildHtml } from '../build.js'; @@ -16,7 +16,7 @@ const check = (n, c, d = '') => { console.log(` ${c ? '✓' : '✗'} ${n}${d ? ' const html = await buildHtml({ minify: true, pwa: false }); const server = Bun.serve({ port: 5231, fetch: () => new Response(html, { headers: { 'content-type': 'text/html' } }) }); -const browser = await puppeteer.launch({ executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] }); +const browser = await puppeteer.launch({ relays: 'read', executablePath: '/usr/bin/google-chrome', headless: 'new', args: ['--no-sandbox'] }); const page = await browser.newPage(); page.on('pageerror', (e) => console.log(' [pageerror]', e.message)); const click = (sel, t) => page.evaluate((s, x) => { const e = [...document.querySelectorAll(s)].find((n) => n.textContent.trim().toLowerCase().includes(x.toLowerCase())); if (e) { e.click(); return true; } return false; }, sel, t); |
