browser-extension icon indicating copy to clipboard operation
browser-extension copied to clipboard

Switch to chrome.storage.sync once FireFox supports this

Open martynchamberlin opened this issue 9 years ago • 3 comments

Essentially we want to undo the changes made in this commit. https://github.com/ChessCom/browser-extension/pull/48/commits/c232aa9303f06bae9eb4d0b1fa99bf61d8d4eaf1

martynchamberlin avatar Dec 01 '16 20:12 martynchamberlin

What about setting an environment variable that indicates whether it was built for Chrome or Firefox (which already have separate webpack config files so that's easy), and then in all these places you just changed it, just make an if else statement?

Just because I'm sure it's nice if at least Chrome users could benefit from the whole Chrome user experience of independence of device.

emilgoldsmith avatar Mar 13 '17 23:03 emilgoldsmith

Actually looks like we can already do it for Firefox now: https://wiki.mozilla.org/WebExtensions/chrome.storage.sync

Not sure if, when the user disables this feature in FF, you could still use it. We'd have to test that. If not then here's a way to check if it's been activated: http://stackoverflow.com/questions/15274481/how-to-detect-if-chrome-sync-feature-is-active-chrome-extension

martynchamberlin avatar Mar 14 '17 01:03 martynchamberlin

Yeah I can get on that at some point.

P.S: Sorry for closing, clicked the close and comment button by accident ;)

emilgoldsmith avatar Mar 14 '17 23:03 emilgoldsmith