fix hid terminal on windows

This commit is contained in:
Adrian Zürcher
2025-12-29 14:59:24 +01:00
parent ff460fffa1
commit 40f683a917
4 changed files with 19 additions and 28 deletions

View File

@@ -27,10 +27,6 @@ type Converter struct {
func NewConverter(chromePath string) (*Converter, error) {
var err error
if runtime.GOOS == "windows" {
hideConsole()
}
c := &Converter{chromePath: chromePath}
chromePath, err = c.getChromePath()
if err != nil {
@@ -42,13 +38,10 @@ func NewConverter(chromePath string) (*Converter, error) {
chromedp.NoSandbox,
chromedp.Headless,
chromedp.DisableGPU,
chromedp.NoFirstRun,
chromedp.Flag("remote-debugging-port", "0"),
chromedp.Flag("disable-extensions", true),
chromedp.Flag("disable-software-rasterizer", true),
chromedp.Flag("disable-dev-shm-usage", true),
)
opts = append(opts, platformOptions())
var allocCtx context.Context
allocCtx, c.cancel = chromedp.NewExecAllocator(context.Background(), opts...)
c.ctx, c.cancel = chromedp.NewContext(allocCtx)