mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-10 17:10:06 -04:00
Update +page.svelte
This commit is contained in:
parent
a8de7b8ad9
commit
3a515c8ac2
1 changed files with 3 additions and 0 deletions
|
@ -4,7 +4,10 @@
|
|||
|
||||
onMount(() => {
|
||||
const id = $page.url.searchParams.get('id')
|
||||
if (!id) return window.location.replace('/')
|
||||
const [name, country] = id.split('.')
|
||||
if (!name || !country) return window.location.replace('/')
|
||||
|
||||
const redirectUrl = `/channels/${country}/${name}`
|
||||
|
||||
window.location.replace(redirectUrl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue