hardcode extension id and not prompt user
Testing / test (push) Has been cancelled

This commit is contained in:
2026-04-17 21:07:30 +02:00
parent 88b4f5ed11
commit a7da6cfab0
+4 -4
View File
@@ -36,6 +36,7 @@ from browser_cli.platform import install_base_dir, is_windows
console = Console() console = Console()
NATIVE_HOST_NAME = "com.browsercli.host" NATIVE_HOST_NAME = "com.browsercli.host"
EXTENSION_ID = "bfpmkhngkjnfhabmfckgeohlilokodkg"
NATIVE_HOST_DIRS = { NATIVE_HOST_DIRS = {
"chrome": { "chrome": {
@@ -284,7 +285,7 @@ def cmd_install(browser):
wrapper_content = f'@echo off\r\n"{sys.executable}" "{native_host_script_path}" %*\r\n' wrapper_content = f'@echo off\r\n"{sys.executable}" "{native_host_script_path}" %*\r\n'
wrapper_path.write_text(wrapper_content, encoding="utf-8") wrapper_path.write_text(wrapper_content, encoding="utf-8")
# Ask for extension ID # Load extension
ext_urls = { ext_urls = {
"chrome": "chrome://extensions", "chrome": "chrome://extensions",
"chromium": "chrome://extensions", "chromium": "chrome://extensions",
@@ -297,10 +298,9 @@ def cmd_install(browser):
console.print(f" 1. Open [cyan]{ext_url}[/cyan]") console.print(f" 1. Open [cyan]{ext_url}[/cyan]")
console.print(" 2. Enable [bold]Developer mode[/bold] (top-right toggle)") console.print(" 2. Enable [bold]Developer mode[/bold] (top-right toggle)")
console.print(f" 3. Click [bold]Load unpacked[/bold] → select: [cyan]{Path(__file__).parent.parent / 'extension'}[/cyan]") console.print(f" 3. Click [bold]Load unpacked[/bold] → select: [cyan]{Path(__file__).parent.parent / 'extension'}[/cyan]")
console.print(" 4. Copy the [bold]Extension ID[/bold] shown on the extension card\n") console.print(f" 4. Extension ID will be [cyan]{EXTENSION_ID}[/cyan] (fixed by built-in key)\n")
extension_id = click.prompt("Paste your extension ID here") extension_id = EXTENSION_ID
extension_id = extension_id.strip()
# Build native messaging manifest # Build native messaging manifest
manifest = { manifest = {