diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 0ed9258a..65a47e3a 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -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(); + } +}); diff --git a/scripts/pi-hole/php/loginpage.php b/scripts/pi-hole/php/loginpage.php index beba3c87..f71c428d 100644 --- a/scripts/pi-hole/php/loginpage.php +++ b/scripts/pi-hole/php/loginpage.php @@ -5,6 +5,7 @@
Sign in to start your session
+