Greasemonkey script folder missing
Asked Answered
B

2

8

I am following the instructions to transfer Greasemonkey scripts to Tampermonkey: How to Transfer All Greasemonkey userscripts to Tampermonkey on Firefox 57+. However the folder "gm_scripts" mentioned in the instructions does not exist on my PC.

Here are the folders that I do have (Click for larger view):

folder screenshot

Would you know which of these the scripts may be in?

I am a beginner at using scripts and maybe this is not really necessary, but it is good practice for me.

Blowhole answered 26/1, 2018 at 21:22 Comment(1)
How many Greasemonkey scripts did you have installed before switching to either Firefox 57+ or Greasemonkey 4+? What versions of Greasemonkey did you have installed, and which version do you have installed now?Gerius
C
13

Apparently GreaseMonkey no longer stores the user scripts in gm_scripts for Firefox. I have Firefox 58 with GreaseMonkey 4.2. I manually added some junk data to one of the user scripts, followed by comparing file sizes for any changed files in AppData, and what I discovered is that the scripts are apparently stored in an SQLite database file located at:

C:\Users\[Username]\AppData\Roaming\Mozilla\Firefox\Profiles\[ID].default\storage\default\moz-extension+++[GUID]\idb\[Number]gyreekansoem.sqlite

I then proceeded to open the database file using a tool called DB Browser for SQLite. Inside the database, the GreaseMonkey user scripts appear to be stored within the object_data table under the data field. The data format is unfortunately not plain text, so I am not sure how exactly to fetch the JavaScript directly from this database field.

Clink answered 18/2, 2018 at 12:41 Comment(3)
Wow, these Firefox WebExtensions have made Greasemonkey even more painful to use than I expected. Ranting at the embedded script editor, I thought "no problem, I'll just go to the gm_script directory and use my editor, as usual"… and here I am. Thanks for investigating.Wingspread
This and other Greasemonkey limitations given by API changes in Firefox 57 and above are officially described at greasespot.net/2017/09/greasemonkey-4-for-script-authors.html.Throne
More info regarding recovery can be found at groups.google.com/g/greasemonkey-users/c/3Om1PUbeZzA?pli=1 and at randomizd.blogspot.com/2019/05/…Lowercase
A
2

If you just need to export all the userscripts, there's a menu item called Export a backup... in the current version of Greasemonkey (tested with version 4.8). This exports all the scripts' folders and files into a ZIP file.

Amnesia answered 12/5, 2019 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.