this post was submitted on 20 Apr 2024
8 points (72.2% liked)

Firefox

4436 readers
53 users here now

A community for discussion about Mozilla Firefox.

founded 2 years ago
MODERATORS
 

Edit: I want to automatically export my themes because I've lost themes in the past on Firefox when addon data would unexpectedly get wiped.

I did some searches but it appears that addons like Stylus only support syncing with cloud storage.

top 7 comments
sorted by: hot top controversial new old
[–] MrOtherGuy 1 points 9 months ago (1 children)

I'm not 100% sure about this, but I don't think addons are allowed to write anything to disk without user interaction, except to their own database of course.

I guess you could do it if you had some other installed software that backed up extension data from Firefox profile folder. Then again, if you are worried about some profile data getting wiped, then it would just make sense to back up the whole profile and not just little bits of it because who knows what other data could get wiped.

[–] TheTwelveYearOld 0 points 9 months ago* (last edited 9 months ago) (1 children)

Tab Session manage can automatically backup sessions to the backup folder. I mentioned that on r/Firefox and got this response:

Oh, this is interesting. It does a backup-to-disk 30 seconds after startup.

During init() it schedules the backup with

setTimeout(backupSessions, 30000);

This generates a silent download to a predefined folder through the functions in these files:

https://github.com/sienori/Tab-Session-Manager/blob/master/src/background/background.js

https://github.com/sienori/Tab-Session-Manager/blob/master/src/background/backup.js

https://github.com/sienori/Tab-Session-Manager/blob/master/src/background/export.js

I didn't know setTimeout() worked in background scripts. If setInterval() works, too, then this could be done every 15 minutes or whatever interval would be sensible for user styles.

[–] MrOtherGuy 1 points 9 months ago

Huh, okay. That does seem like extensions can indeed write arbitrary data to default download directory automatically. Maybe you can create a feature request to existing extension for that kind of feature. Although I would think that an interval is totally unnecessary and it would make more sense to only make a backup whenever style editor is started or a style is otherwise being added/removed or some such.

[–] [email protected] 1 points 9 months ago (1 children)

You can export your stylus data

[–] TheTwelveYearOld 1 points 9 months ago (2 children)

I want to export them automatically because I've had Firefox addon data get wiped unexpectedly.

[–] [email protected] 1 points 9 months ago

You could run a WebDAV server locally and make it sync to that.

[–] [email protected] 1 points 9 months ago

How often are you changing stuff?