-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow-clippy-live.js
More file actions
27 lines (23 loc) · 1.02 KB
/
Copy pathshow-clippy-live.js
File metadata and controls
27 lines (23 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { chromium } = require('playwright');
const path = require('path');
const EXT_PATH = path.resolve(__dirname, 'extension');
const SITE = process.argv[2] || 'https://www.youtube.com/results?search_query=football+highlights';
(async () => {
const context = await chromium.launchPersistentContext('', {
headless: false,
args: [
`--disable-extensions-except=${EXT_PATH}`,
`--load-extension=${EXT_PATH}`,
'--no-first-run',
'--no-default-browser-check',
'--start-maximized'
],
viewport: null
});
const page = await context.newPage();
await page.goto(SITE, { waitUntil: 'domcontentloaded' });
console.log('חלון Chrome נפתח עם התוסף טעון — קליפי אמור להופיע בפינה השמאלית-תחתונה.');
console.log('החלון יישאר פתוח. סגור אותו ידנית כשתרצה, או Ctrl+C כאן כדי לסגור אותו.');
// Keep the process (and the browser window) alive until manually stopped
await new Promise(() => {});
})();