Sharing add-on user-generated data between Firefox 57+ and Thunderbird


Prior to Firefox 57, my add-on, Clippings, was compatible with Firefox and Thunderbird. User-generated data was stored in an RDF datasource, and the CRUD operations were done through XPCOM interfaces. Additionally, my add-on offered the flexibility of using the same RDF datasource file between the two applications by customizing the folder location of the RDF file in the extension preferences UI.

Clippings has since been rewritten as a WebExtension, and the data store was switched to IndexedDB (via the Dexie.js library). But users with both Firefox 57+ and Thunderbird are no longer able to share their data like they used to. Many users are currently working around this by downgrading their Firefox to ESR 52.x and installing an older XUL+XPCOM-based version of my add-on – but clearly this is only a short-term solution.

I’m thinking of ways to bring back the ability to share the data outside of the Firefox user profile folder so that users can use the same data in Thunderbird, or Firefox 57+ on other computers, if the data location is a network drive or a folder synced with Dropbox, Google Drive, etc.

What options do I have to achieve this? Suggestions and pointers are appreciated.

(Jorge) #2

The WebExtensions API doesn’t support file system management at the moment (tracked on this bug), so your options are limited. Extensions can use the downloads API to export data, but that’s not ideal.

I can see a couple of options: native messaging and cloud storage. With native messaging you can delegate storing the data to an external application. With cloud storage you just need an external API to connect to and send the data. Maybe Dropbox and others have ways to do that.