MrOtherGuy / firefox-csshacks

Collection of userstyles affecting the browser
Mozilla Public License 2.0
3.45k stars 328 forks source link

Good tool/addon to sync these tweaks between profiles? #293

Open AnnanFay opened 1 year ago

AnnanFay commented 1 year ago

Out of scope for this project I assume, but directly related to the use case. Does anyone know of a Firefox addon which will automatically sync the styles between firefox profiles on different devices?

Or if not, how are you deploying css tweaks to a new device?

Looking online returns quite old, or out of date discussions:

If a good solution for this already exists it would be great to have it linked in the README. If not then I'd be interested in knowing what workarounds people use so I can do something like that.

MrOtherGuy commented 1 year ago

Extensions cannot directly write to file-system so writing an extension for this is impossible.

Autoconfig is an option. One mechanism you could experiment with would be to:

  1. Get list of style names with a autocnfig script
  2. Save that as a custom pref
  3. Set Firefox to Sync said pref on both/all end-points
  4. When the pref changes run autoconfg script to fetch files with those names from the repository and save them into the chrome folder of that pref and modify userChrome.css to load those files

It should work I think, with a caveat that it simply syncs the file-names, so it doesn't include any changes you might have made to those files.

I mean, it doesn't sound trivial to write those scripts but I'm pretty sure it would work if written correctly.

That being said, I'm not sure if syncing styles between profiles is even something you would want. It certainly isn't something I would want, especially not between different machines.