summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikk Andresen <mikk.andresen@gmail.com>2017-05-05 11:17:07 +0300
committerMikk Andresen <mikk.andresen@gmail.com>2017-05-05 11:17:07 +0300
commitc959cdbaa7a59ffe594710b2c86c369d55817385 (patch)
treeee4068c91924faa403ffde2487a640ea8d513f60
parent582e2c3819bbecb41bad55b5a66ceb7b3bc3aaac (diff)
downloadetherpad-lite-c959cdbaa7a59ffe594710b2c86c369d55817385.zip
Pad_cookie.js to have isCookiesEnabled() cause wasNoCookie() is also true when User visits first time.
-rw-r--r--src/static/js/pad.js2
-rw-r--r--src/static/js/pad_cookie.js3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/static/js/pad.js b/src/static/js/pad.js
index 0c825eeb..9c3de091 100644
--- a/src/static/js/pad.js
+++ b/src/static/js/pad.js
@@ -453,7 +453,7 @@ var pad = {
// This will check if the prefs-cookie is set.
// Otherwise it shows up a message to the user.
padcookie.init();
- if (padcookie.wasNoCookie())
+ if (!padcookie.isCookiesEnabled())
{
$('#loading').hide();
$('#noCookie').show();
diff --git a/src/static/js/pad_cookie.js b/src/static/js/pad_cookie.js
index f6ef1aa4..62c88cff 100644
--- a/src/static/js/pad_cookie.js
+++ b/src/static/js/pad_cookie.js
@@ -124,6 +124,9 @@ var padcookie = (function()
{
return wasNoCookie;
},
+ isCookiesEnabled: function() {
+ return !!getRawCookie();
+ },
getPref: function(prefName)
{
return cookieData[prefName];