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

Remove duplicate appRouter.param function

This commit is contained in:
Bill Thornton 2022-04-11 11:20:53 -04:00
parent 1ad87beaf6
commit 812b8f1c74
5 changed files with 10 additions and 24 deletions

View file

@ -12,7 +12,6 @@ import Dashboard from '../scripts/clientUtils';
import ServerConnections from './ServerConnections';
import alert from './alert';
import reactControllerFactory from './reactControllerFactory';
import { getLocationSearch } from '../utils/url.ts';
class AppRouter {
allRoutes = [];
@ -116,19 +115,6 @@ class AppRouter {
});
}
param(name, url) {
name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
const regexS = '[\\?&]' + name + '=([^&#]*)';
const regex = new RegExp(regexS, 'i');
const results = regex.exec(url || getLocationSearch());
if (results == null) {
return '';
} else {
return decodeURIComponent(results[1].replace(/\+/g, ' '));
}
}
ready() {
return this.promiseShow || Promise.resolve();
}