You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
440 B
16 lines
440 B
7 years ago
|
|
||
|
// by tauren
|
||
|
// https://github.com/Modernizr/Modernizr/issues/191
|
||
|
|
||
|
Modernizr.addTest('cookies', function () {
|
||
|
// Quick test if browser has cookieEnabled host property
|
||
|
if (navigator.cookieEnabled) return true;
|
||
|
// Create 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;
|
||
|
});
|
||
|
|