HumbleNewTabPage icon indicating copy to clipboard operation
HumbleNewTabPage copied to clipboard

Options synchronization

Open denis-sokolov opened this issue 11 years ago • 9 comments

I use many computers, and I bet many people use at least two. While your extension already uses built-in bookmark synchronization, I don't believe you synchronize your options, like background color, position of folders open on the screen, etc.

I believe it is fairly simple to add it, given that Chrome now has the storage.sync API. Are you planning to add such a feature?

Other than that, your extension is super awesome! :)

denis-sokolov avatar Apr 13 '13 15:04 denis-sokolov

Yes I am planning on adding this feature; thanks for the feedback.

ibillingsley avatar Apr 13 '13 16:04 ibillingsley

+1 for options sync.

But are bookmarks supposed to sync as well already? My Chrome Bookmarks do, but my Humblepage on any new computer is blank each time.

canadaka avatar Nov 14 '13 08:11 canadaka

Nothing in HNTP syncs currently. For now, you'll have to re-do the layout of your page on each new machine.

ibillingsley avatar Nov 14 '13 22:11 ibillingsley

+1 for syncing layout options.

mrdennis avatar Mar 08 '14 17:03 mrdennis

+1 Its been nearly 2 years and any update on this?

turmoggy avatar Jan 08 '15 07:01 turmoggy

Development has sort of stalled due to personal reasons but I haven't abandoned it. I can't give an estimate but I'm working toward a major update that will include this. I need to rewrite a lot of the internals to properly support this and other features.

ibillingsley avatar Jan 08 '15 16:01 ibillingsley

Hey!

Great extension, Chrome sync would just be the last feature I need.

Would you be able to detail a bit why it is complicated / why it requires a significant refactoring to add support for this feature?

I see that you have several localStorage.setItem(key, value) and localStorage.getItem(key) calls. Would it be enough to define helpers (getConfig(key), setConfig(key, value)) that call chrome.storage.sync.set or get, respectively?

I'm asking to figure out if it would be hard for an external contributor to add this feature.

(I have no background in chrome extension dev, so please excuse my naive question).

Thanks!

nicdumz avatar Jan 06 '16 18:01 nicdumz

In theory, yes. The hard parts are:

  • localStorage is synchronous, chrome.storage is async (takes a callback), so it's not as simple as find-and-replace
  • Preserving the user's existing settings. I don't want everyone to lose them when I update.
  • Handling the limitations of the sync storage (max number of items, max size per item)

Now the refactor/rewrite isn't strictly necessary but I wanted to do so anyway because I am not happy with the code as it is (I wrote it when I was first learning javascript). I didn't want to change the storage format once and then change it again when I refactor because migrating the old settings becomes that much harder.

ibillingsley avatar Jan 06 '16 18:01 ibillingsley

User from 2022, just being curious, is there a way to sync now?

wanderseeme avatar Feb 15 '22 10:02 wanderseeme