This commit is contained in:
freearhey 2023-10-09 14:30:45 +03:00
parent 09f6d12085
commit 69185509a0
5 changed files with 119 additions and 68 deletions

View file

@ -12,11 +12,13 @@
const guides = channel._guides
const streams = channel._streams
const [name, country] = channel.id.split('.')
let currLocation
const { open } = getContext('simple-modal')
const onOpened = () => {
currLocation = window.location.href
window.history.pushState({}, `${channel.name} • iptv-org`, `/channels/${channel.id}`)
window.history.pushState({}, `${channel.name} • iptv-org`, `/channels/${country}/${name}`)
}
const onClosed = () => {
window.history.pushState({}, `iptv-org`, currLocation || '/')
@ -91,7 +93,7 @@
<div class="flex space-x-2 items-center">
<a
on:click|preventDefault={showChannelData}
href="/channels/{channel.id}"
href="/channels/{country}/{name}"
tabindex="0"
class="font-normal text-gray-600 dark:text-white hover:underline hover:text-blue-500 line-clamp-1"
title={channel.name}