Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Greasemonkey script folder missing

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.

like image 215
Danny R Avatar asked Jan 26 '18 21:01

Danny R


People also ask

Where are Greasemonkey scripts stored?

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.

Where are Tampermonkey scripts located?

On Windows 7 they are installed here C:\Users\cbrand\AppData\Local\Google\Chrome\User Data\Default which is to say my user folder, the AppData\Local being the version of . files on Windows, which doesn't have any sort of "use . name to hide the file by default", and then etc.


2 Answers

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.

like image 193
Michael Avatar answered Nov 09 '22 04:11

Michael


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.

like image 39
Petr Bodnár Avatar answered Nov 09 '22 02:11

Petr Bodnár