Where are the grease monkey scripts stored in the firefox addon ?

Skip to first unread message

slafajsld asdf

Feb 4, 2021, 1:45:14 PMFeb 4
to greasemonkey-dev
   My firefox profile is corrupted but thankfully firefox backed the profile directory to desktop. How to retrieve my custom grease monkey scripts that are stored in the firefox profile directory ?

Lonely dev

Anthony Lieuallen

Feb 4, 2021, 3:59:19 PMFeb 4
to greasemo...@googlegroups.com
That's not an easy endeavor. They're stored in an IndexedDB ( https://github.com/greasemonkey/greasemonkey/blob/master/src/bg/user-script-registry.js#L287 ) which is a format with very little (AFAIK?) tooling.  (Because there's very few options for persistence for a WebExtension.)

You received this message because you are subscribed to the Google Groups "greasemonkey-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to greasemonkey-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/greasemonkey-dev/a8b2df17-02ad-4e91-a02e-ab0605dc8a26n%40googlegroups.com.

Aaron Boodman

Feb 4, 2021, 4:09:41 PMFeb 4
to greasemo...@googlegroups.com
I bet it would be possible to create a new empty firefox profile then copy just the indexeddb data into it. Just need to find the directory that indexeddb data is stored within.

slafajsld asdf

Feb 6, 2021, 7:10:43 AMFeb 6
to greasemo...@googlegroups.com
Thanks Aaron. That saved me. I created a new profile in the "about:profiles" page and imported my "old profile data" directory saved by the firefox. I got the solution from this link https://support.mozilla.org/en-US/questions/1212433.

Just one more important query. How do people backup the grease moneky scripts. Ideally i want to be able to maintain it in a version control system in a file system and deploy it from there. This is possible even today by copying and pasting from the external file system to the greasemonkey script opened within the firefox. But it makes it so hard to experiment, that i don't use external directory.

slafajsld asdf

Feb 6, 2021, 7:12:20 AMFeb 6
to greasemo...@googlegroups.com
Thanks Anthony. Its great to see the actual source code that saves to indexdb. I was able to import the profile directory from the "about:profiles" page which is much easier.

Reply all
Reply to author
0 new messages