summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-18 11:35:59 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-18 11:35:59 -0700
commit94c727a9c20e9fed0dab3d7e2688f9b96f0743e7 (patch)
tree422c7abe627630cb342c401c6c894ba6c12fa230 /web/react/utils/utils.jsx
parent8ae7afa5cc0119c7308aa87ce65c3c6c875da985 (diff)
parentb7ada27c019598afe95ac4fb6b0a63f394510785 (diff)
downloadchat-94c727a9c20e9fed0dab3d7e2688f9b96f0743e7.tar.gz
chat-94c727a9c20e9fed0dab3d7e2688f9b96f0743e7.tar.bz2
chat-94c727a9c20e9fed0dab3d7e2688f9b96f0743e7.zip
Merge pull request #9 from rgarmsen2295/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(".");
+}