HumbleNewTabPage
HumbleNewTabPage copied to clipboard
Options synchronization
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! :)
Yes I am planning on adding this feature; thanks for the feedback.
+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.
Nothing in HNTP syncs currently. For now, you'll have to re-do the layout of your page on each new machine.
+1 for syncing layout options.
+1 Its been nearly 2 years and any update on this?
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.
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!
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.
User from 2022, just being curious, is there a way to sync now?