mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 20:25:14 +02:00
Rework title of built-in player
This commit is contained in:
parent
c5f4f8b246
commit
424e34190c
@ -20,7 +20,7 @@ async function main() {
|
||||
}
|
||||
|
||||
const url = await match.match(re)
|
||||
location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}`))
|
||||
location.assign(chrome.runtime.getURL(`ui/player/player.html?id=${match.id}&url=${encodeURIComponent(url)}&domains=${window.location.host}`))
|
||||
}
|
||||
|
||||
main()
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>HLS</title>
|
||||
<title>Stream Bypass</title>
|
||||
<link rel="stylesheet" href="player.css">
|
||||
<script src="player.js" defer></script>
|
||||
</head>
|
||||
|
@ -65,13 +65,14 @@ async function main() {
|
||||
const urlQuery = new URLSearchParams(window.location.search)
|
||||
const id = urlQuery.get('id')
|
||||
const url = urlQuery.get('url')
|
||||
const domain = urlQuery.get('domain')
|
||||
|
||||
const match = matches.find((m) => m.id === id)
|
||||
if (match === undefined) {
|
||||
show_message(`Invalid id: ${id}. Please report this <a href="https://github.com/ByteDream/stream-bypass/issues/new">here</a>`)
|
||||
return
|
||||
}
|
||||
document.title = match.name
|
||||
document.title = `Stream Bypass (${domain})`
|
||||
|
||||
url.endsWith('.m3u8') ? await play_hls(url, match) : await play_native(url, match)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user