diff options
author | Corey Hulen <corey@hulen.com> | 2015-06-25 11:36:47 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-06-25 11:36:47 -0400 |
commit | 9a81e76de0861a3e855ca734af90dcace6000734 (patch) | |
tree | f5c1365c06afcbc5e9c9dc1fc93ebd7cf564fba5 /web/react/utils | |
parent | a8e078d367db2ddbf9888ed1068ad7bb5b1c887e (diff) | |
parent | 2082ee5bdc69d6331db64af64ff686b99ddddd55 (diff) | |
download | chat-9a81e76de0861a3e855ca734af90dcace6000734.tar.gz chat-9a81e76de0861a3e855ca734af90dcace6000734.tar.bz2 chat-9a81e76de0861a3e855ca734af90dcace6000734.zip |
Merge pull request #32 from rgarmsen2295/mm-1282
MM-1282
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index a5d1e8895..75c583c8f 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -96,6 +96,21 @@ module.exports.getCookie = function(name) { if (parts.length == 2) return parts.pop().split(";").shift(); } +module.exports.isLocalStorageSupported = function() { + try { + sessionStorage.setItem("testSession", '1'); + sessionStorage.removeItem("testSession"); + + localStorage.setItem("testLocal", '1'); + localStorage.removeItem("testLocal", '1'); + + return true; + } + catch (e) { + return false; + } +} + module.exports.notifyMe = function(title, body, channel) { if ("Notification" in window && Notification.permission !== 'denied') { Notification.requestPermission(function (permission) { |