Added cookie test of login page

This commit is contained in:
DL6ER
2017-01-16 15:45:44 +01:00
parent 2f334430e1
commit 09f5bfdea8
2 changed files with 22 additions and 1 deletions

View File

@@ -204,3 +204,24 @@ $(document).keypress(function(e) {
$("#loginform").submit();
}
});
function testCookies()
{
if (navigator.cookieEnabled) return true;
// set and read cookie
document.cookie = "cookietest=1";
var ret = document.cookie.indexOf("cookietest=") != -1;
// delete cookie
document.cookie = "cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
return ret;
}
$(function() {
if(!testCookies() && $("#cookieInfo").length)
{
$("#cookieInfo").show();
}
});