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.
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.
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.
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.