mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
optimizing defineRoute in routes.js
This commit is contained in:
parent
cc0e19c6bd
commit
b4257bfda8
1 changed files with 2 additions and 4 deletions
|
@ -12,12 +12,10 @@ define([
|
||||||
"listViewStyle",
|
"listViewStyle",
|
||||||
"dashboardcss"], function () {
|
"dashboardcss"], function () {
|
||||||
|
|
||||||
function defineRoute(newRoute, dictionary) {
|
function defineRoute(newRoute) {
|
||||||
var baseRoute = Emby.Page.baseUrl();
|
|
||||||
var path = newRoute.path;
|
var path = newRoute.path;
|
||||||
path = path.replace(baseRoute, "");
|
|
||||||
console.log("Defining route: " + path);
|
console.log("Defining route: " + path);
|
||||||
newRoute.dictionary = newRoute.dictionary || dictionary || "core";
|
newRoute.dictionary = "core";
|
||||||
Emby.Page.addRoute(path, newRoute);
|
Emby.Page.addRoute(path, newRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue