1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove getWindowLocationSearch global and duplicate implementation

This commit is contained in:
Bill Thornton 2022-04-05 15:15:54 -04:00
parent 891c63a3da
commit 8e66ba315a
5 changed files with 16 additions and 29 deletions

View file

@ -26,6 +26,7 @@ import './routes';
import '../components/themeMediaPlayer';
import './autoBackdrops';
import { pageClassOn, serverAddress } from './clientUtils';
import { getWindowLocationSearch } from '../utils/url.ts';
import './screensavermanager';
import './serverNotifications';
import '../components/playback/playerSelectionMenu';
@ -41,21 +42,6 @@ import SyncPlayHtmlAudioPlayer from '../components/syncPlay/ui/players/HtmlAudio
import { currentSettings } from './settings/userSettings';
import taskButton from './taskbutton';
// TODO: Move this elsewhere
window.getWindowLocationSearch = function(win) {
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 || '';
};
// TODO: Move this elsewhere
window.getParameterByName = function(name, url) {
name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');