ankit / stylebot

Change the appearance of the web instantly
https://stylebot.dev/
MIT License
1.39k stars 206 forks source link

Syncing stylesheets across devices #644

Closed lloydi closed 3 years ago

lloydi commented 3 years ago

I use StyleBot on 3 different computers - 2 Macs and 1 Windows laptop. I have to keep local copies of CSS files and update each instance of Stylebot.

Ideally, I would be able to either:

1 - Sync directly within Stylebot (by having some kind of account) OR 2 - Allow Stylebot to use a local file as the source for any user style (and these files could then be synced via iCloud/OneDrive etc)

ankit commented 3 years ago

@lloydi in the 3.1 version (in review), you will be able to sync styles using Google Drive (so a limited version of 1). The limitation is that you will have to manually click "Sync Now" to update your styles on different browsers. This is because I am using client-side OAuth and the OAuth permission will expire. More information: https://stylebot.dev/help/#sync

In the future, I can explore: 1) adding more OAuth providers such as Github, etc. 2) Making the sync automatically happen in the background. This will require me to bring up a server, so it is non-trivial.

Web extensions currently do not allow to read/write local files, so unfortunately, 2 won't be feasible.

ankit commented 3 years ago

Closing this since we now have some level of sync support

nchicong commented 2 years ago

Hi @ankit ,

I had a case with sync feature. Here are the steps to reproduce:

  1. Computer A & B both have style on domain google.com & facebook.com
  2. Computer A has new updates on the style for domain facebook.com
  3. Computer B has new updates on the style for domain google.com
  4. Clicked Sync on computer A.
  5. Clicked Sync on computer B.
  6. New updates from computer B for domain google.com is lost.

If sync feature won't be able to actually compare each style and sync one style by one individually, I hope an alert can be useful to warn user that the current computer has some newer update compared to the json file on google drive.

Let me know if I should open a new issue instead of commenting on this closed one.

Thanks.