I have an Addon that uses the Addon SDK, which I now need to rewrite using WebExtension (WE). What it basically does is to directly read the places.sqlite database, extract the bookmarks/history data, encode that data using some character encoding, zlib compress that data and write it to the disk. So essentially the Addon enables users to process their data with external tools.
Although I have already looked at the WE’s documentation on developer.mozilla.org, I still need to answer some key aspects:
-
It doesn’t look like WE has the means to directly read/write from/to a SQLite database file. Is such an access in the works? (Just to be clear: I have no need to run my Addon inside another browser).
-
My SDK Addon allows me to easily split large source files into smaller modules and even to embed 3rd party ones (character encoding, zlib compression, etc). But that doesn’t seem to work with WE, because the “require()” directive doesn’t seem to work anymore. What seems possible is to add all source files to the “background” directive inside the “manifest.json” file, which gets quite impractical if you want to embed necessary 3rd party modules.
-
So far I didn’t see any way to read/write data from/to files on the disk. I guess it would be possible to dump the resulting csv text data into a new browser tab and then let the user copy-and-paste that data into a file. But that gets impractical if you take into account, that this text data can be multiple Megabytes large. Is there a way to write to a file? Would it be possible to add a download button to such a browser tab?
Thanks in advance for any constructive comments on these issues.