fix(windows): silent default dump on double-click (#591)

This commit is contained in:
Roger
2026-04-27 14:47:59 +08:00
committed by GitHub
parent 5c0b1ad5cf
commit 439ff52b02
6 changed files with 50 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
//go:build windows
package main
import (
"github.com/inconshreveable/mousetrap"
"github.com/spf13/cobra"
"github.com/moond4rk/hackbrowserdata/utils/winapi"
)
// configureDoubleClickMode hides the console and bypasses cobra's
// double-click guard when launched from Explorer (issue #344).
func configureDoubleClickMode() {
if !mousetrap.StartedByExplorer() {
return
}
cobra.MousetrapHelpText = ""
winapi.HideConsoleWindow()
}