feature.js icon indicating copy to clipboard operation
feature.js copied to clipboard

add Cookie enable check pls

Open newbie78 opened this issue 8 years ago • 3 comments

thanks!

newbie78 avatar Mar 05 '16 09:03 newbie78

Why not create a PR?

softwarespot avatar Mar 05 '16 09:03 softwarespot

on mootools it would be like this:

function cookieTest() {
    var rnd=Number.random(1000000, 9999999);
    var myCookie=Cookie.write('check', rnd);
    var test=Cookie.read('check');
    if ( typeOf(test)=='null' ) { // cookie off
        return false;
    }
    if (rnd!=test) { // wrong cookie given
        return false;
    }
    myCookie.dispose(); // rem
    return true;
}

=)

newbie78 avatar Mar 05 '16 10:03 newbie78

I'm not sure that that is the purpose of this library. All the tests offered in this library correspond to the support of features, not if features are enabled or disabled.

I'm curious of @viljamis's thoughts on this one.

meowsus avatar May 13 '19 18:05 meowsus