mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 20:25:14 +02:00
Static 3rd party library version
This commit is contained in:
parent
e41bc2b8ef
commit
d93a5ea784
@ -38,10 +38,10 @@ Supported streaming providers (for a complete list of all supported websites, se
|
||||
</details>
|
||||
|
||||
The addon was tested on
|
||||
- Firefox (94.0b9)
|
||||
- Firefox (95.0b8)
|
||||
- Ungoogled Chromium (94.0)
|
||||
- Vivaldi (4.3)
|
||||
- Opera (80.0)
|
||||
- Opera (81.0)
|
||||
|
||||
## Installing
|
||||
|
||||
|
29
build.py
29
build.py
@ -1,9 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import io
|
||||
import json
|
||||
import sys
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
@ -36,13 +38,6 @@ 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 https://unpkg.com {' '.join(f'*.{toplevel}' for toplevel in domains)}; object-src 'self'"
|
||||
|
||||
json.dump(manifest, open('src/manifest.json', 'w'), indent=2)
|
||||
|
||||
|
||||
@ -118,15 +113,17 @@ def copy_built():
|
||||
ext_path = Path('build', 'ext')
|
||||
if not ext_path.is_dir():
|
||||
ext_path.mkdir()
|
||||
for name, url in {
|
||||
'hls.js': 'https://cdn.jsdelivr.net/npm/hls.js@latest',
|
||||
'popper.js': 'https://unpkg.com/@popperjs/core@2',
|
||||
'tippy.js': 'https://unpkg.com/tippy.js@6'
|
||||
}.items():
|
||||
with open(ext_path.joinpath(name), 'wb') as f:
|
||||
ext_js = urllib.request.urlopen(url)
|
||||
f.write(ext_js.read())
|
||||
f.close()
|
||||
|
||||
# download hls.js (version 1.1.1)
|
||||
with zipfile.ZipFile(io.BytesIO(urllib.request.urlopen('https://github.com/video-dev/hls.js/releases/download/v1.1.1/release.zip').read())) as z:
|
||||
open(ext_path.joinpath('hls.light.min.js'), 'wb').write(z.read('dist/hls.light.min.js'))
|
||||
z.close()
|
||||
|
||||
# download popperjs core (version 2.10.2)
|
||||
open(ext_path.joinpath('popper.min.js'), 'wb').write(urllib.request.urlopen('https://unpkg.com/@popperjs/core@2.10.2/dist/umd/popper.min.js').read())
|
||||
|
||||
# download tippy.js (version 6.3.7)
|
||||
open(ext_path.joinpath('tippy-bundle.umd.min.js'), 'wb').write(urllib.request.urlopen('https://unpkg.com/tippy.js@6.3.7/dist/tippy-bundle.umd.min.js').read())
|
||||
|
||||
|
||||
def clean_build():
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "Stream Bypass",
|
||||
"author": "ByteDream",
|
||||
"description": "A multi-browser addon / extension for multiple streaming providers which redirects directly to the source video.",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"homepage_url": "https://github.com/ByteDream/stream-bypass",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
@ -39,7 +39,7 @@
|
||||
"permissions": [
|
||||
"storage"
|
||||
],
|
||||
"content_security_policy": "script-src 'self' blob: https://cdn.jsdelivr.net https://unpkg.com *.io *.to *.co *.com *.me *.pro *.net *.st *.sx; object-src 'self'",
|
||||
"content_security_policy": "script-src 'self' blob:; object-src 'self'",
|
||||
"browser_action": {
|
||||
"default_icon": "icons/stream-bypass.png",
|
||||
"default_title": "Stream Bypass",
|
||||
|
@ -4,9 +4,8 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="popup.css">
|
||||
<script src="../ext/popper.js"></script>
|
||||
<script src="../ext/popper.js"></script>
|
||||
<script src="../ext/tippy.js"></script>
|
||||
<script src="../ext/popper.min.js"></script>
|
||||
<script src="../ext/tippy-bundle.umd.min.js"></script>
|
||||
<script src="../match.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<title>m3u8</title>
|
||||
<link rel="stylesheet" href="/res/hls.css">
|
||||
<script src="/ext/hls.js"></script>
|
||||
<script src="/ext/hls.light.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<video id="video"></video>
|
||||
<p id="message" hidden></p>
|
||||
<script src="/res/hls.js"></script>
|
||||
<script src="/res/hls.light.min.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user