mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-27 18:40:31 +02:00
Added native m3u8 / hls streaming
This commit is contained in:
7
build.py
7
build.py
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user