From 424e34190c3f4af3888de065df84009223d42970 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 16 Jul 2022 02:32:23 +0200 Subject: [PATCH] Rework title of built-in player --- src/index.ts | 2 +- src/ui/player/player.html | 2 +- src/ui/player/player.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 4fe9103..4e72641 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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() diff --git a/src/ui/player/player.html b/src/ui/player/player.html index 8bcf77d..e28f7ed 100644 --- a/src/ui/player/player.html +++ b/src/ui/player/player.html @@ -2,7 +2,7 @@ - HLS + Stream Bypass diff --git a/src/ui/player/player.ts b/src/ui/player/player.ts index bd665af..05691ce 100644 --- a/src/ui/player/player.ts +++ b/src/ui/player/player.ts @@ -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 here`) return } - document.title = match.name + document.title = `Stream Bypass (${domain})` url.endsWith('.m3u8') ? await play_hls(url, match) : await play_native(url, match) }