xNUTs / episodes

Automatically exported from code.google.com/p/episodes
Apache License 2.0
0 stars 0 forks source link

findStartCookie fails if EPISODES cookie is not the last one #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load a page episodes.js on it and with the EPISODES cookie not the last one 
in document.cookie.
2. Run EPISODES.findStartCookie().

What is the expected output? What do you see instead?
Expected: the start time. Actual: undefined.

What version of the product are you using? On what operating system?
Checked out via "svn checkout http://episodes.googlecode.com/svn/trunk/ 
episodes-read-only" on the morning of 14/02/2011. Version: 0.2. Rev: r13. OS: 
Ubuntu 10.10. Browser: Firefox 3.6.13.

Please provide any additional information below.
It looks like the line:

var aCookies = document.cookie.split(' ');

should be:

var aCookies = document.cookie.split('; ');

Otherwise, the semicolon separating cookies is left in and therefore it does 
not match document.referrer.

I implemented this fix and it seems to work fine.

Original issue reported on code.google.com by chrisbre...@gmail.com on 14 Feb 2011 at 1:35

GoogleCodeExporter commented 8 years ago
I should have said, I'm talking about episodes.js in the additional information 
section.

Original comment by chrisbre...@gmail.com on 14 Feb 2011 at 2:40