diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-22 13:11:29 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-22 13:11:29 +0900 |
| commit | d2182c1705a0c1ca66003a0236f979e493edb668 (patch) | |
| tree | 6d9c8ad40cbd3a6c7c1c31080c3f9965a728968e /src/web/app/common/scripts | |
| parent | [Server] Some performance improvements (diff) | |
| download | sharkey-d2182c1705a0c1ca66003a0236f979e493edb668.tar.gz sharkey-d2182c1705a0c1ca66003a0236f979e493edb668.tar.bz2 sharkey-d2182c1705a0c1ca66003a0236f979e493edb668.zip | |
[Client] Fix bug: Add missing config property (url)
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/config.js | 10 |
1 files 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 |