aboutsummaryrefslogtreecommitdiffstats
path: root/modules/web/chromium/extensions/inject_extension_key.py
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-30 01:01:48 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-08-31 05:20:12 +0530
commit42a02dea80094145bea4f07c72e84a5868d63e69 (patch)
tree4c307e7a03b55f3ed2441cb4e759d6373b907a66 /modules/web/chromium/extensions/inject_extension_key.py
parent66e401fb6324c073a0770e0a4afe6d5cca830046 (diff)
downloadhome-manager-config-42a02dea80094145bea4f07c72e84a5868d63e69.tar.gz
home-manager-config-42a02dea80094145bea4f07c72e84a5868d63e69.zip
feat: replaced python scripts with lua
- using lua scripts where we previously used python for lower resource consumption
Diffstat (limited to 'modules/web/chromium/extensions/inject_extension_key.py')
-rw-r--r--modules/web/chromium/extensions/inject_extension_key.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/modules/web/chromium/extensions/inject_extension_key.py b/modules/web/chromium/extensions/inject_extension_key.py
deleted file mode 100644
index f1b7055..0000000
--- a/modules/web/chromium/extensions/inject_extension_key.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python3
-import json
-import re
-import sys
-
-manifest_path = sys.argv[1]
-ext_key = sys.argv[2]
-
-with open(manifest_path, "r", encoding="utf-8", errors="ignore") as f:
- content = f.read()
-
-pattern = r"(\"[^\"]*?\")|//.*?$|/\*.*?\*/"
-clean = re.sub(
- pattern,
- lambda m: m.group(1) if m.group(1) else "",
- content,
- flags=re.DOTALL | re.MULTILINE,
-)
-
-clean = re.sub(r",\s*([\]}])", r"\1", clean)
-
-data = json.loads(clean)
-data["key"] = ext_key
-
-with open(manifest_path, "w", encoding="utf-8") as f:
- json.dump(data, f, indent=2)