The cookie doesn't have an expiration set correctly, so it dies after the session is cleared. (When browser is quit)

CommentFileSizeAuthor
#4 styleswitcher.zip10.08 KBschackattack

Comments

gregarios’s picture

You might actually try rewriting your module to take advantage of the JQuery code, as described here:
http://www.cssnewbie.com/simple-jquery-stylesheet-switcher

Also, Your demo link is broken.

rancky’s picture

I am writing a new module based on Styleswitcher with another js script.
I have integrated http://www.kelvinluck.com/2006/05/switch-stylesheets-with-jquery/ in the styleswitcher module.

It seems to work fine. I just need some tests and improvements before making the module available for the community.

Coming soon...

gregarios’s picture

Fantastic. Please announce it in this thread as well if you would. :-)

schackattack’s picture

StatusFileSize
new10.08 KB

Like rancky I've modified the existing module to work with the same mentioned js. Or actually the updated version of the script:
http://www.kelvinluck.com/assets/jquery/styleswitch/toggle.html

For anyone interested here's the version that works for me in Drupal 6.16.

julien66’s picture

Your fix seems to work just perfect for me as well. This should be the main release. Nice work. Thank you.

entuland’s picture

Subscribing to schackattack's mod, worked flawlessly for me too.

Also, it would be useful to add an option to disable the fade to black between style changes - or is it there already and I wasn't able to find it?

schackattack’s picture

@Entuland. Sorry for the late reply, but I'm swamped...To my knowledge there's no such option at the time. You're right, it would be nice to give the option to control the overlay effect -> color, duration etc. I'll have a look at it again, when I can find the time. Sorry, but that's the best that I can offer at the time.

alanburke’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Category: bug » feature

Moving to the D7 version.
I'll look through the code and see what can be done

alanburke’s picture

Priority: Critical » Normal
Status: Active » Fixed

Ok
I've made a commit that allows the overlay to be disabled.
A config form has been added for that.
Cookies last until the end of the session too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.