mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-11 13:15:13 +02:00
firefox addon fix
This commit is contained in:
parent
1e7b9b3d8d
commit
052c0d1e78
14
build.py
14
build.py
@ -3,6 +3,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
import urllib.request
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
@ -114,6 +115,19 @@ def copy_built():
|
|||||||
elif file.suffix != '.ts':
|
elif file.suffix != '.ts':
|
||||||
shutil.copy(str(file), str(build_file))
|
shutil.copy(str(file), str(build_file))
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
|
|
||||||
def clean_build():
|
def clean_build():
|
||||||
for file in Path('src').rglob('*'):
|
for file in Path('src').rglob('*'):
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Stream Bypass",
|
"name": "Stream Bypass",
|
||||||
"author": "ByteDream",
|
"author": "ByteDream",
|
||||||
"description": "",
|
"description": "A multi-browser addon / extension for multiple streaming providers which redirects directly to the source video.",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"homepage_url": "https://github.com/ByteDream/stream-bypass",
|
"homepage_url": "https://github.com/ByteDream/stream-bypass",
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Title</title>
|
<title>Title</title>
|
||||||
<link rel="stylesheet" href="popup.css">
|
<link rel="stylesheet" href="popup.css">
|
||||||
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
<script src="../ext/popper.js"></script>
|
||||||
<script src="https://unpkg.com/tippy.js@6"></script>
|
<script src="../ext/popper.js"></script>
|
||||||
|
<script src="../ext/tippy.js"></script>
|
||||||
<script src="../match.js"></script>
|
<script src="../match.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>m3u8</title>
|
<title>m3u8</title>
|
||||||
<link rel="stylesheet" href="/res/hls.css">
|
<link rel="stylesheet" href="/res/hls.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
<script src="/ext/hls.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<video id="video"></video>
|
<video id="video"></video>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
function showMessage(message: string) {
|
function showMessage(message: string) {
|
||||||
let messageElement = document.getElementById('message') as HTMLParagraphElement
|
let messageElement = document.getElementById('message') as HTMLParagraphElement
|
||||||
messageElement.innerHTML = message
|
messageElement.innerText = message
|
||||||
messageElement.hidden = false
|
messageElement.hidden = false
|
||||||
document.getElementById('video').hidden = true
|
document.getElementById('video').hidden = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user