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:
parent
1ad87beaf6
commit
812b8f1c74
5 changed files with 10 additions and 24 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue