footer.js: remove duplicate function.

There's already a function checking for cookies in the previous document.ready function.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2020-05-25 09:41:13 +03:00
parent 8f8fb36d25
commit c7e3be4b07

View File

@@ -110,6 +110,21 @@ function checkMessages() {
});
}
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;
}
$(document).ready(function () {
var enaT = $("#enableTimer");
var target = new Date(parseInt(enaT.html()));
@@ -207,24 +222,3 @@ $(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 > 0) {
$("#cookieInfo").show();
}
});