From d2182c1705a0c1ca66003a0236f979e493edb668 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 13:11:29 +0900 Subject: [PATCH] [Client] Fix bug: Add missing config property (url) --- src/web/app/common/scripts/config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/web/app/common/scripts/config.js b/src/web/app/common/scripts/config.js index e44e174a92..4203431bd0 100644 --- a/src/web/app/common/scripts/config.js +++ b/src/web/app/common/scripts/config.js @@ -1,9 +1,10 @@ -const url = new URL(location.href); +const Url = new URL(location.href); -const isRoot = url.host.split('.')[0] == 'misskey'; +const isRoot = Url.host.split('.')[0] == 'misskey'; -const host = isRoot ? url.host : url.host.substring(url.host.indexOf('.') + 1, url.host.length); -const scheme = url.protocol; +const host = isRoot ? Url.host : Url.host.substring(Url.host.indexOf('.') + 1, Url.host.length); +const scheme = Url.protocol; +const url = `${scheme}//${host}`; const apiUrl = `${scheme}//api.${host}`; const devUrl = `${scheme}//dev.${host}`; const aboutUrl = `${scheme}//about.${host}`; @@ -11,6 +12,7 @@ const aboutUrl = `${scheme}//about.${host}`; module.exports = { host, scheme, + url, apiUrl, devUrl, aboutUrl