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

Persistent commands history #206

Merged
merged 3 commits into from
Sep 25, 2013
Merged

Conversation

milushov
Copy link
Contributor

Very annoying that history is lost after reloading page, therefore I think better way is store commands history in localStorage.

@nicklasos
Copy link

+1

@avevlad
Copy link

avevlad commented Sep 17, 2013

@artemeff
Copy link

👍

2 similar comments
@nkt
Copy link

nkt commented Sep 17, 2013

👍

@onemanstartup
Copy link

👍

@milushov
Copy link
Contributor Author

hey @charliesome, what's up?

this.previousCommands = [];
this.previousCommandOffset = 0;

var previousCommands = JSON.parse(localStorage.getItem("previousCommands"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please 'namespace' the local storage key with a Better Errors related prefix so it has less of a chance of clashing with other local storage keys.

@haileys
Copy link
Collaborator

haileys commented Sep 22, 2013

Other than the comments I've left above, this looks good and I'm happy to merge this when those comments are resolved.

@milushov
Copy link
Contributor Author

@charliesome, done

@milushov
Copy link
Contributor Author

😞

@filp
Copy link
Contributor

filp commented Sep 25, 2013

👍 Looks good to me!

haileys pushed a commit that referenced this pull request Sep 25, 2013
@haileys haileys merged commit b598788 into BetterErrors:master Sep 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants