optimizing defineRoute in routes.js

This commit is contained in:
vitorsemeano 2019-03-18 23:48:34 +00:00
parent cc0e19c6bd
commit b4257bfda8

View file

@ -12,12 +12,10 @@ define([
"listViewStyle",
"dashboardcss"], function () {
function defineRoute(newRoute, dictionary) {
var baseRoute = Emby.Page.baseUrl();
function defineRoute(newRoute) {
var path = newRoute.path;
path = path.replace(baseRoute, "");
console.log("Defining route: " + path);
newRoute.dictionary = newRoute.dictionary || dictionary || "core";
newRoute.dictionary = "core";
Emby.Page.addRoute(path, newRoute);
}