change the way to load extension

This commit is contained in:
geekgeekrun
2026-01-12 22:03:31 +08:00
parent 454ee421bf
commit ca37e258c6
2 changed files with 4 additions and 4 deletions

View File

@@ -30,9 +30,8 @@ export async function main() {
const { puppeteer } = await initPuppeteer()
const browser = await puppeteer.launch({
headless: false,
args: [
`--load-extension=${editThisCookieExtensionPath}`
]
pipe: true,
enableExtensions: [editThisCookieExtensionPath]
})
const closeAttachedSet = new WeakSet()

View File

@@ -371,7 +371,8 @@ export async function launchBossSite() {
const { puppeteer } = await initPuppeteer()
const browser = await puppeteer.launch({
headless: false,
args: [`--load-extension=${editThisCookieExtensionPath}`]
pipe: true,
enableExtensions: [editThisCookieExtensionPath]
})
let [page] = await browser.pages()
for (let i = 0; i < bossCookies.length; i++) {