Search code examples
androidfirefoxgreasemonkey

Share greasemonkey script and database between Windows and Android Firefox


I've been using a homemade greasemonkey scripts for ages on my laptop Firefox. It includes storing data with GM.setValue.

Now I just bought an Android tablet, and would like to be able to use this script and update the values, whereas I'm using the laptop or the tablet.

Hoped that Firefox Sync would handle that, but not even the scripts are synced.

I thought of synchronizing the script dans db files (Google drive, dropbox, whatever), but I realized that since the v4, the db that used to be in gm_scripts is gone, and I have no idea where Greasemonkey stores either the scripts or their associated database now.

I'm looking for anything that might make it work.

1) Is there a way to handle that with Firefox Sync ?

2) Would an alternative (Tampermonkey, Violentmonkey, ?) handle that better ?

3) Where can I find the scripts/database in the new Greasemonkey system ?

4) Could I synchronize them via Google drive ? (There seem to be some hacks to sync a file between machines)

5) Would there be a simple, free alternative that would allow me to synchronize a very small file between machines ?

=============================================== Update on this:

I tried TamperMonkey instead, it has a sync feature but even if it seems ok on different laptops or my phone, the syncing is random at best on the tablet.

Also realized that only scripts are synced, and not their data. The script almost never changes, but the data is updated several times a day, so not really a solution anyway.

Data doesn't exist anymore in a readable file format, so no luck either on syncing the data file externally.

TamperMonkey has also an import/export feature, this does take the data into account. So the best I can do for now is thinking about exporting then importing every time I switch device. Not ideal so still in search of a better solution.


Solution

  • Conclusion: 1-2) I switched to TamperMonkey where I could easily up/download scripts from Google Drive (or other).

    3-4-5) New browser extensions architecture means that you basically can't access the data on file system

    The only solution is to store/retrieve data elsewhere, not with the GM methods. I stored mine in an airtable base, because it offers a pretty easy to use API that can be called from user scripts.