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

Remove getParameterByName global

This commit is contained in:
Bill Thornton 2022-04-05 15:58:12 -04:00
parent 8e66ba315a
commit 67169e2a6a
12 changed files with 23 additions and 15 deletions

View file

@ -26,7 +26,6 @@ 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';
@ -43,18 +42,6 @@ import { currentSettings } from './settings/userSettings';
import taskButton from './taskbutton';
// TODO: Move this elsewhere
window.getParameterByName = function(name, url) {
name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
const regexS = '[\\?&]' + name + '=([^&#]*)';
const regex = new RegExp(regexS, 'i');
const results = regex.exec(url || getWindowLocationSearch());
if (results == null) {
return '';
}
return decodeURIComponent(results[1].replace(/\+/g, ' '));
};
function loadCoreDictionary() {
const languages = ['af', 'ar', 'be-by', 'bg-bg', 'bn_bd', 'ca', 'cs', 'da', 'de', 'el', 'en-gb', 'en-us', 'eo', 'es', 'es-419', 'es-ar', 'es_do', 'es-mx', 'fa', 'fi', 'fil', 'fr', 'fr-ca', 'gl', 'gsw', 'he', 'hi-in', 'hr', 'hu', 'id', 'it', 'ja', 'kk', 'ko', 'lt-lt', 'mr', 'ms', 'nb', 'nl', 'pl', 'pr', 'pt', 'pt-br', 'pt-pt', 'ro', 'ru', 'sk', 'sl-si', 'sq', 'sv', 'ta', 'th', 'tr', 'uk', 'ur_pk', 'vi', 'zh-cn', 'zh-hk', 'zh-tw'];