gigebyte / cookies

Automatically exported from code.google.com/p/cookies
0 stars 0 forks source link

Minified Version Issue #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using the minified version of the cookie script

jquery.cookies.2.0.1.min.js

Windows XP Pro SPK3

FF 3.0.6

I get an error that isn't present in the full sized script.

Error: $.cookies is undefined

CODE:

foo = {

cookie_name: 'landing',
cookie_expiry: 365 * 24,        //In hours

check_cookie: function(){
    if($.cookies.get(foo.cookie_name) && $.cookies.get(foo.cookie_name) == 1){
        document.location = 'http://www.google.com'
    }else{
        $.cookies.set(foo.cookie_name, 1, { hoursToLive: foo.cookie_expiry });
        document.location = 'http://www.cnn.com'
    }
}

}

$(document).ready(function(){

 foo.check_cookie();

});

Original issue reported on code.google.com by dnmor...@gmail.com on 23 Feb 2009 at 8:00

GoogleCodeExporter commented 9 years ago

Original comment by auldrid...@gmail.com on 23 Feb 2009 at 8:03

GoogleCodeExporter commented 9 years ago
I recently put this code through LINT and found some minor issues.  I cleaned 
it all
up and committed in those changes in r21.  Can you download the code from the 
trunk
of the SVN repo and run it through minifier ( 
http://fmarcia.info/jsmin/test.html )
to see if it works better?  If you can't get around to it, when I go to release 
2.0.2
I'll be doing the same test anyway.

I am still working out my testing process for this code, so thanks for bearing 
with me.

Jim

Original comment by auldrid...@gmail.com on 25 Feb 2009 at 1:47

GoogleCodeExporter commented 9 years ago

Original comment by auldrid...@gmail.com on 25 Feb 2009 at 2:20

GoogleCodeExporter commented 9 years ago
Using JSLint I've cleaned up the code and there should be no issue in the next 
release.  I'll run my test suite 
against minified and uncompressed versions before releasing, but I believe this 
to be fixed.

Original comment by auldrid...@gmail.com on 11 May 2009 at 7:30

GoogleCodeExporter commented 9 years ago

Original comment by auldrid...@gmail.com on 27 Jan 2011 at 6:59