mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-13 18:40:06 -04:00
Update store.js
This commit is contained in:
parent
f377009397
commit
598606b6f0
1 changed files with 5 additions and 2 deletions
|
@ -2,6 +2,7 @@ import { writable, get } from 'svelte/store'
|
||||||
import { Playlist, Link } from 'iptv-playlist-generator'
|
import { Playlist, Link } from 'iptv-playlist-generator'
|
||||||
import sj from '@freearhey/search-js'
|
import sj from '@freearhey/search-js'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { browser } from '$app/environment'
|
||||||
|
|
||||||
export const query = writable('')
|
export const query = writable('')
|
||||||
export const hasQuery = writable(false)
|
export const hasQuery = writable(false)
|
||||||
|
@ -72,8 +73,10 @@ export function setSearchParam(key, value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setPageTitle(value) {
|
export function setPageTitle(value) {
|
||||||
|
if (browser) {
|
||||||
const title = value ? `${value} · iptv-org` : 'iptv-org'
|
const title = value ? `${value} · iptv-org` : 'iptv-org'
|
||||||
document.title = title
|
window.document.title = title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadAPI() {
|
async function loadAPI() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue