summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-17 07:54:30 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-17 07:54:30 -0700
commit8e65f38979696df993c15a5c3752f4bba91a0978 (patch)
tree7ca8cb11aed7753b04d84fedfe0630879c30a069 /web/react/utils/utils.jsx
parent9e0d4f70e01ecf8f157fed6e6145284c202bc44a (diff)
parent0d6ed4a6ab14c4fc4bbdf4bd0b63c19d896a7b48 (diff)
downloadchat-8e65f38979696df993c15a5c3752f4bba91a0978.tar.gz
chat-8e65f38979696df993c15a5c3752f4bba91a0978.tar.bz2
chat-8e65f38979696df993c15a5c3752f4bba91a0978.zip
Merge pull request #3 from mattermost/master
to me
Diffstat (limited to 'web/react/utils/utils.jsx')
-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(".");
+}