Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save "Preview theme" option #13940

Closed
XhmikosR opened this issue Jun 26, 2014 · 6 comments
Closed

Save "Preview theme" option #13940

XhmikosR opened this issue Jun 26, 2014 · 6 comments

Comments

@XhmikosR
Copy link
Member

Not sure if it's worth doing this or not but it makes sense to have this saved via a cookie probably.

@hnrch02
Copy link
Collaborator

hnrch02 commented Jun 26, 2014

I'd opt for localStorage, much easier to work with than cookies and has surprisingly good browser support.

@XhmikosR
Copy link
Member Author

I don't have any experience with that. I was think using jquery cookie to save the cookie, but if this is simpler and results in less code, I don't see why not using it 👍

@hnrch02
Copy link
Collaborator

hnrch02 commented Jun 26, 2014

Much less code, it's essentially just

localStorage.setItem(key, value);
localStorage.getItem(key, value);

@cvrebert cvrebert added this to the v3.2.1 milestone Jun 26, 2014
@XhmikosR
Copy link
Member Author

@hnrch02: PR is more than welcome :)

@hnrch02
Copy link
Collaborator

hnrch02 commented Jun 26, 2014

Incoming in ~2 hours.

@mdo
Copy link
Member

mdo commented Jun 29, 2014

Merged.

@mdo mdo closed this as completed Jun 29, 2014
mdo added a commit that referenced this issue Jun 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants