DanAtkinson / Fuskr

Fuskr - an image gallery extension for Google Chrome

Home Page:http://danatkinson.github.io/Fuskr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Chrome Options v2 and chrome.storage.sync

DanAtkinson opened this issue · comments

So Chromium got off their arses and implemented some standard options functionality. I'm happy to implement it, but personally I think it's pretty poor.

It was first introduced in the back end of 2014 and I had hoped that it would get better or more refined but that sadly hasn't happened. Effectively, the options page has become an iframe popup on the extensions page and doesn't appear to allow for AngularJS injection. Perhaps understandable, but regrettable nonetheless. Suffice to say that I am seriously disappointed with Chromium's efforts on the crx options. The issues they have 25317 and 386830 detail their implementation and other users' efforts to implement better, standardised options pages.

I'd also like to take this opportunity to make use of the chrome.storage.sync functionality.

More information on Options v2:
https://developer.chrome.com/extensions/optionsV2
https://developer.chrome.com/extensions/options

Maybe there's been a change because I have the options v2 working with the rest of the Angular code (hurrah).

I'm doing a refactor of the JS and will have this checked in along with that. Still need to look into chrome.storage.sync but I think it's just a matter of replacing it. Not much of a biggy :)

Yarp. Locally I just replaced localStorage with chrome.storage.sync.

I did start de-linting the files, but you can revert those changes if yours supersedes those. :)

Changed options to use the v2 popup style windows (PR#30) but it isn't running the angular controller for the meantime.

It runs the angular app and works for the translations but there was a weird thing with it not saving. Plus, I'd like to refactor it to use actual typed values in storage but that requires a refactor of background.js and that's for another commit :)

Closing after having merged PR#33

This includes the new options menu and sync storage.