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

Remember the last time period selected #3

Open
Gitoffthelawn opened this issue Sep 13, 2016 · 3 comments
Open

Remember the last time period selected #3

Gitoffthelawn opened this issue Sep 13, 2016 · 3 comments

Comments

@Gitoffthelawn
Copy link

The extension always reverts to just showing history items for "Today", even if the user selects "All".

Please have the extension remember the last time period selected.

@nobodxbodon
Copy link
Owner

nobodxbodon commented Nov 2, 2016

After some trying, I've not found a better/easier approach than below:

Save the selected option onHide in storage

And load the saved option by emit message to content js, and init the selector with the option, with something like below:

var today = document.getElementById("today");
last7days.setAttribute("checked", false);

Not yet sure to use ‘checked’ or ‘selected’

@Gitoffthelawn
Copy link
Author

Thanks for looking into it. What about simply saving a preference in prefs.js?

@nobodxbodon
Copy link
Owner

Thanks for looking into it. What about simply saving a preference in prefs.js?

Good one. I suppose that's an alternative to "Save the selected option onHide in storage" part. Still the rest (emit message to content js and init selector) will be needed.

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

No branches or pull requests

2 participants