diff options
author | John McLear <john@mclear.co.uk> | 2014-11-01 20:21:48 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-11-01 20:21:48 +0000 |
commit | a22b558a2c3659b7b374e262e9a6bf01c0821c36 (patch) | |
tree | cba5cdf46ff15be887c4eca79ba74f8f18a4e278 | |
parent | d54bb52b759bd68a1ec78735008f88eb9cb22d1f (diff) | |
download | etherpad-lite-a22b558a2c3659b7b374e262e9a6bf01c0821c36.zip |
change to proper IE check
-rw-r--r-- | src/static/js/pad.js | 2 | ||||
-rw-r--r-- | src/static/js/pad_utils.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 73fcd3d6..0f5fbe72 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -67,7 +67,7 @@ function createCookie(name, value, days, path){ /* Warning Internet Explorer doe } //Check if the browser is IE and if so make sure the full path is set in the cookie - if(navigator.appName=='Microsoft Internet Explorer'){ + if((navigator.appName == 'Microsoft Internet Explorer') || ((navigator.appName == 'Netscape') && (new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null))){ document.cookie = name + "=" + value + expires + "; path="+document.location; } else{ diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js index 343e5fce..ff60ca7c 100644 --- a/src/static/js/pad_utils.js +++ b/src/static/js/pad_utils.js @@ -55,7 +55,7 @@ function createCookie(name, value, days, path){ /* Used by IE */ } //Check if the browser is IE and if so make sure the full path is set in the cookie - if(navigator.appName=='Microsoft Internet Explorer'){ + if((navigator.appName == 'Microsoft Internet Explorer') || ((navigator.appName == 'Netscape') && (new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null))){ document.cookie = name + "=" + value + expires + "; path=/"; /* Note this bodge fix for IE is temporary until auth is rewritten */ } else{ |