summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorasaadmahmoodspin <asaad@battlehouse.com>2015-06-19 19:52:04 +0500
committerasaadmahmoodspin <asaad@battlehouse.com>2015-06-19 19:52:04 +0500
commit20676fd740781e3b818b7411be17ec6f4f67bc3f (patch)
tree059988228781471d43fd212525cb3bd53de0e040 /web/react/utils
parent0821b51f4ee5fcc2eadc2c92c60ebbb4fdc084d3 (diff)
parent32025e43799324523988af040085d95ec6b6e80e (diff)
downloadchat-20676fd740781e3b818b7411be17ec6f4f67bc3f.tar.gz
chat-20676fd740781e3b818b7411be17ec6f4f67bc3f.tar.bz2
chat-20676fd740781e3b818b7411be17ec6f4f67bc3f.zip
Merge pull request #1 from rgarmsen2295/mm-1253
MM-1253
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..628d92342 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.protocol + "//" + window.location.host;
+ }
+ parts[0] = "www";
+ return window.location.protocol + "//" + parts.join(".");
+}