diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-30 01:06:50 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-30 01:06:50 -0800 |
commit | d93bf60248f066542d0851a7b6847f925975d77f (patch) | |
tree | bb2c8a931855c3a9da6cdd7d906a8f1b99b7fd46 /web/react/utils/utils.jsx | |
parent | b4877c5d36569dae486a1e53f39c35d346e3d3d2 (diff) | |
parent | deb4fac1f64fde5d5f435129a79eada44cb6994c (diff) | |
download | chat-d93bf60248f066542d0851a7b6847f925975d77f.tar.gz chat-d93bf60248f066542d0851a7b6847f925975d77f.tar.bz2 chat-d93bf60248f066542d0851a7b6847f925975d77f.zip |
Merge branch 'master' into mm-1355
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index fbf1e0d4f..8a4d92b85 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -22,8 +22,6 @@ module.exports.cleanUpUrlable = function(input) { return cleaned; }; - - module.exports.isTestDomain = function() { if ((/^localhost/).test(window.location.hostname)) @@ -841,3 +839,12 @@ module.exports.getDisplayName = function(user) { } } }; + +//IE10 does not set window.location.origin automatically so this must be called instead when using it +module.exports.getWindowLocationOrigin = function() { + var windowLocationOrigin = window.location.origin; + if (!windowLocationOrigin) { + windowLocationOrigin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); + } + return windowLocationOrigin; +}; |