mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-14 02:50:07 -04:00
Replace history.pushState with svelte pushState
This commit is contained in:
parent
627ea95ec9
commit
b8e45bcd98
2 changed files with 11 additions and 11 deletions
|
@ -8,6 +8,7 @@
|
|||
import ClosedBadge from './ClosedBadge.svelte'
|
||||
import { downloadMode, selected } from '~/store'
|
||||
import { fade } from 'svelte/transition'
|
||||
import { pushState } from '$app/navigation'
|
||||
|
||||
export let channel
|
||||
|
||||
|
@ -21,10 +22,10 @@
|
|||
let prevUrl = '/'
|
||||
const onOpened = () => {
|
||||
prevUrl = window.location.href
|
||||
window.history.pushState({}, `${displayName} • iptv-org`, `/channels/${country}/${name}`)
|
||||
pushState(`/channels/${country}/${name}`, {})
|
||||
}
|
||||
const onClose = () => {
|
||||
window.history.pushState({}, `iptv-org`, prevUrl)
|
||||
pushState(prevUrl, {})
|
||||
}
|
||||
const showGuides = () =>
|
||||
open(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue