summaryrefslogtreecommitdiff
path: root/src/static/js/pad_utils.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-12-03 14:28:25 +0000
committerJohn McLear <john@mclear.co.uk>2012-12-03 14:28:25 +0000
commit1e8d954560bc7e475d73ce9e4df82ffeb2492c80 (patch)
tree5a5e6642b212b3f5601b2d141e82354f751a619f /src/static/js/pad_utils.js
parentb3e55f64a86951ddd25243c4b593cf61ec109c4c (diff)
downloadetherpad-lite-1e8d954560bc7e475d73ce9e4df82ffeb2492c80.zip
best I can do with this temporary fix for IE
Diffstat (limited to 'src/static/js/pad_utils.js')
-rw-r--r--src/static/js/pad_utils.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js
index 7c97b035..82f7fcad 100644
--- a/src/static/js/pad_utils.js
+++ b/src/static/js/pad_utils.js
@@ -39,26 +39,24 @@ function randomString(len)
return randomstring;
}
-function createCookie(name, value, days, path)
-{
+function createCookie(name, value, days, path){ /* Used by IE */
if (days)
{
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = "; expires=" + date.toGMTString();
}
- else var expires = "";
+ else{
+ var expires = "";
+ }
- if(!path)
+ if(!path){ // IF the Path of the cookie isn't set then just create it on root
path = "/";
-
- // This fixes an issue with IE not wanting to store cookies for Auth #1234. It's a temp fix because
- // Really we should be storing the cookie on teh document.location path and not modifying the fsking URL to contain a password!
- // document.cookie = name + "=" + value + expires + "; path=" + "/";
+ }
//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'){
- document.cookie = name + "=" + value + expires + "; path="+document.location;
+ document.cookie = name + "=" + value + expires + "; path=/"; /* Note this bodge fix for IE is temporary until auth is rewritten */
}
else{
document.cookie = name + "=" + value + expires + "; path=" + path;