Last modified: 2013-10-16 05:23:26 UTC
Once a cookie gets set for a tour, it will often come up on undesired pages (e.g. special pages) and actions. This can be worked around with a JavaScript snippet at the top of the tour, but it would be nice to be able to use declarative syntax. Perhaps: namespaces: ['', 'project'], actions: ['view', 'edit', 'submit'] etc. This could potentially be used for pages too, but the default would probably be all pages. This could also possibly be used for individual steps as a supplement to shouldSkip, but that might complicate things.
Even though it isn't declarative, when you do need a function to control this (e.g. when you want to check the openTask cookie with getTasks()), it might be helpful to provide a callback for this instead of putting it at the top of the JavaScript. I'm not sure if this is useful, though.
I've added showConditionally for this. Currently, the only value is 'stickToFirstPage', meaning that it should only show on the same page it first showed on. I'm going to add a function option as well. The current method of bailing out before calling defineTour is problematic. It means the tour never gets defined, so there is no metadata, even though it may still load on another page.