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
commitcafbada5148546750ec50af8a5e754d22ebf5059 (patch)
tree948d72720cca1a486c0e13d9b3b5c8597027451d /web/react/utils/utils.jsx
parenta7ed61ef90492dee7f9825b5563ed575d4f60c77 (diff)
parent5a8f8397167cec8cba29b70bb7dbdda9ba0265f7 (diff)
downloadchat-cafbada5148546750ec50af8a5e754d22ebf5059.tar.gz
chat-cafbada5148546750ec50af8a5e754d22ebf5059.tar.bz2
chat-cafbada5148546750ec50af8a5e754d22ebf5059.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(".");
+}