Skip to content

Initialize localStorage on extension install, instead of in options.js #4

@CompyENG

Description

@CompyENG

Currently, options are only saved to localStorage once the "save" button is clicked in options.html. With the new automatic options, it's feasible to not ever need to go to the options page (provided the defaults are sane enough for your tastes). Therefore, it would be more logical to initialize these settings in background.js upon the first extension load (check localStorage.length == 0).

Currently, there is a check done for settings in validateSettings() in background.js, but it isn't very sane given the new options (if( ! localStorage.url && ! localStorage.subscriber )). Right now, an alert is shown pointing towards the settings page if this check fails. That message could be removed when this issue is closed.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions