summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-06-16 15:35:34 -0400
committerChristopher Speller <crspeller@gmail.com>2015-06-16 15:35:34 -0400
commit14b409220e76e73fab6b0df9c724599bc97b1da2 (patch)
tree8c1c9c95259886587f20271f0cfbd16a0be87b6a /web/react/utils
parentfdb3f152748a3590516e53fd3864eb91d3b62bbb (diff)
downloadchat-14b409220e76e73fab6b0df9c724599bc97b1da2.tar.gz
chat-14b409220e76e73fab6b0df9c724599bc97b1da2.tar.bz2
chat-14b409220e76e73fab6b0df9c724599bc97b1da2.zip
Switching from config file to parsing homelink from url
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/utils.jsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 72ed48faf..b20e54e84 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -730,3 +730,15 @@ Image.prototype.load = function(url, progressCallback) {
};
Image.prototype.completedPercentage = 0;
+
+module.exports.getHomeLink = function() {
+ if (config.HomeLink != "") {
+ return config.HomeLink;
+ }
+ var parts = window.location.host.split(".");
+ if (parts.length <= 1) {
+ return window.location.host;
+ }
+ parts[0] = "www";
+ return parts.join(".");
+}