5

With the new update to Firefox 57 and Greasemonkey 4.0 it seems that the gm_scripts folder is no longer where the user.js scripts are stored.

Where are the scripts stored now?

Any suggestions for keeping these scripts in git?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
Rob
  • 3,687
  • 2
  • 32
  • 40
  • 1
    Greasemonkey now includes an "Export a backup" option which I can use to backup and source code control my scripts. – Rob Sep 20 '18 at 21:04

1 Answers1

8

Where are the scripts stored now?

WebExtension API does not allow local file access so add-ons store data in their own storage area as an IndexDB at C:\Users\[Username]\AppData\Roaming\Mozilla\Firefox\Profiles\[Random].default\storage\default\moz-extension+++80728271-a923-4e37-a81d-68452721034c

The negative issues are:

  • You cant manually edit them with your own editor and you have to use the GM interface to edit them.

  • If you uninstal GM, all script will be gone and reinstalling GM wont bring them back.

  • At the moment GM doesn't have an Import (to manually load scripts) or Export (to create backups). Although you can export all scripts by copying the folder above.

You can copy scripts to Git and GM will (there are issues now) be able to get them from Git.

The gm_scripts folder should still be in the Firefox profile folder. GM4 doesn't delete it but it wont be able to use it.

https://superuser.com/questions/38093/where-are-the-greasemonkey-scripts-kept-in-portable-firefox

In XP: C:\Documents and Settings\user\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\gm_scripts

In Vista: c:\users\user\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default\gm_scripts

Select the profile you want to use (if you only have one, it should look something like xxxxxxxx.default). Finally select the gm_scripts folder.

On a MAC: On a Mac, you can find your profile at ~/Library/Application Support/Firefox/Profiles

mt025
  • 273
  • 4
  • 13
erosman
  • 7,094
  • 7
  • 27
  • 46
  • What would the file path be for where the scripts are stored? – Rob Nov 18 '17 at 23:21
  • Thanks for that information @erosman, but I meant more what files in that profile folder are the new locations for the data. For example I've grepped my profile folder for script names and contents and cannot file a file text or binary with that text. – Rob Nov 20 '17 at 13:06
  • @Rob New location in GM4? They are not there. They are in an IndedexDB assigned to GM and not directly accessible like before. They are in binary format. – erosman Nov 20 '17 at 19:47
  • There isn't a file path to an IndedexDB file on disk for GM4? – Rob Nov 22 '17 at 01:30
  • @rob you can lunch the debugger for GM to inspect the IndexedDB. I dont know where Firefox 57 stores them. – erosman Nov 22 '17 at 17:31