Added native m3u8 / hls streaming

This commit is contained in:
2021-10-23 00:13:53 +02:00
parent 2e13586ebb
commit 9929c48761
6 changed files with 53 additions and 2 deletions

View File

@ -35,6 +35,13 @@ def write_manifest():
for content_script in manifest['content_scripts']:
content_script['matches'] = [f'*://{match}/*' for match in matches]
domains = []
for match in matches:
toplevel = match.split('.')[-1]
if toplevel not in domains:
domains.append(toplevel)
manifest['content_security_policy'] = f"script-src 'self' blob: https://cdn.jsdelivr.net {' '.join(f'*.{toplevel}' for toplevel in domains)}; object-src 'self'"
json.dump(manifest, open('src/manifest.json', 'w'), indent=2)