fix(basic.gblib): update ChatServices.ts #420
1 changed files with 6 additions and 4 deletions
|
|
@ -102,10 +102,12 @@ async function createBrowser(profilePath): Promise<any> {
|
||||||
args.push(`--user-data-dir=${profilePath}`);
|
args.push(`--user-data-dir=${profilePath}`);
|
||||||
|
|
||||||
const preferences = urljoin(profilePath, "Default", "Preferences");
|
const preferences = urljoin(profilePath, "Default", "Preferences");
|
||||||
const file = Fs.readFileSync(preferences, "utf8")
|
if (Fs.existsSync(preferences)) {
|
||||||
const data = JSON.parse(file)
|
const file = Fs.readFileSync(preferences, "utf8")
|
||||||
data["profile"]['exit_type'] = "none";
|
const data = JSON.parse(file)
|
||||||
Fs.writeFileSync(preferences, JSON.stringify(data))
|
data["profile"]['exit_type'] = "none";
|
||||||
|
Fs.writeFileSync(preferences, JSON.stringify(data))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue