aboutsummaryrefslogtreecommitdiffstats
path: root/modules/web/chromium/patch_native_host.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/web/chromium/patch_native_host.py')
-rw-r--r--modules/web/chromium/patch_native_host.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/modules/web/chromium/patch_native_host.py b/modules/web/chromium/patch_native_host.py
deleted file mode 100644
index 38afb44..0000000
--- a/modules/web/chromium/patch_native_host.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python3
-import argparse
-import json
-
-parser = argparse.ArgumentParser(
- description="Set allowed_origins in a native messaging host manifest"
-)
-parser.add_argument("extension_id", help="Chrome extension ID")
-parser.add_argument("input", help="Path to the input JSON manifest")
-parser.add_argument("output", help="Path to write the patched JSON manifest")
-args = parser.parse_args()
-
-with open(args.input) as f:
- manifest = json.load(f)
-
-origin = f"chrome-extension://{args.extension_id}/"
-manifest["allowed_origins"] = [origin]
-
-with open(args.output, "w") as f:
- json.dump(manifest, f, indent=2)
- f.write("\n")