Recovering a deleted usersript

57 views
Skip to first unread message

Hans Holzfäller

unread,
Jun 11, 2025, 10:32:22 AMJun 11
to greasemonkey-users
Hi,

I accidentally removed one of my userscripts (the edit and delete menu items are way too close to each other lol), so now I'm looking for a way to recover it if possible. I didn't close my browser (Firefox) since then, and there are active tabs still running this script, however it doesn't appear in the debugger, neither its variables and functions are accessible via the console. I also tried to use the profiler, but couldn't get anything helpful from there.

Then in the %appdata% profile folder I found a moz-extension+++%id%\idb\%num%gyreekansoem.sqlite file. When opened in notepad, it contains a %myscript_name% string. I used DB Browser for SQLite, and ran SELECT data FROM object_data. There are some plaintext script parts in the returned data (no %myscript_name% found this time though), but I couldn't recognize the data format. Is there a way to get the entire script from this db?

Anthony Lieuallen

unread,
Jun 11, 2025, 12:52:06 PMJun 11
to greasemon...@googlegroups.com
Technically maybe to yes.  Practically no.  Greasemonkey uses IndexedDB ( https://developer.mozilla.org/en-US/docs/Glossary/IndexedDB ) for storage.  You'd have to be able to decode that, and it'd have to still be in there.  My guess would be that you found the raw string in a not-yet-vacuumed ( https://www.sqlite.org/lang_vacuum.html ) page, and thus it's not there in a structured way to just conveniently extract.

P.S. Yes, moving the uninstall menu item further out of the way would be an improvement.

--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to greasemonkey-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/greasemonkey-users/880a74e9-7526-48aa-bc5f-7b8f1bfb869dn%40googlegroups.com.

Hans Holzfäller

unread,
Jun 14, 2025, 9:51:00 AMJun 14
to greasemonkey-users
Yes, I've managed to decode the data using the snappy python lib (https://www.reddit.com/r/firefox/comments/b5mome/comment/ejeroef/), and there are all scripts but the deleted one.

среда, 11 июня 2025 г. в 19:52:06 UTC+3, Anthony Lieuallen:
Reply all
Reply to author
Forward
0 new messages