Closed juanj closed 4 years ago
thanks @juanj ! As with the other PRs I'm happy to merge it after someone gets a chance to test it
@cTheDragons Hey! Can you give it a try? Not much changed, so all should be working. The principal thing to test is that the user preferences are kept between sessions.
Also want to point out thet when testing the extension there is no need to make a zip file. For Chrome: https://superuser.com/a/247654 For Firefox https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/
I'm a little flat out with work and..... pirating so I may be a week or so before I can get to it. ok?
No worries! Take your time.
Yes this seems to be working!
Good to see it all one branch.
Thanks for your hard work on this.
Thanks @juanj , I'm merging the code, if you have an Habitica uuid I'll be happy to note it in your profile
Happy to see this merged!
My UUID is 2cedef5a-666a-484b-bd97-726209679923
Fixes #68
The code for Firefox and Chrome was almost identical, the only differences were some fields on the manifest, and the use of the namespace
browser
instead ofchrome
Conveniently Firefox also recognizes the namespace
chrome
, so the same code can be use for both.There was one problem with the settings storage. For some reason Firefox always returns
undefined
when callingchrome.storage.sync.get()
. This was solved by callingchrome.storage.local.get()
instead. The difference between these two objects is that the data saved tosync
is shared across all browsers instances where the user is logged in. I don't think this is something essential for this extension but if needed we can find a workaround for that.