mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
14 lines
337 B
TypeScript
14 lines
337 B
TypeScript
![]() |
export const getWindowLocationSearch = (win: Window | null | undefined) => {
|
||
|
let search = (win || window).location.search;
|
||
|
|
||
|
if (!search) {
|
||
|
const index = window.location.href.indexOf('?');
|
||
|
|
||
|
if (index != -1) {
|
||
|
search = window.location.href.substring(index);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return search || '';
|
||
|
};
|