Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Chrome/Tampermonkey userscripts stored on the filesystem? [closed]

Where are Chrome/Tampermonkey userscripts stored on the filesystem?

I want to edit user scripts directly instead of using the hokey in-browser editor.

like image 762
Landon Kuhn Avatar asked Aug 07 '12 16:08

Landon Kuhn


People also ask

Where are Tampermonkey scripts stored Chrome?

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.

Where are userscripts stored?

Where are the userscripts stored? They are stored in the local storage area of the browser extension.

How do I use userscripts on Tampermonkey?

To get started, install Tampermonkey. Tap its toolbar icon, and select Add a new script . An editor opens with a default script. There's a bunch of metadata at the top; fill out the @match field to control where the script will run.

How do I view Tampermonkey scripts?

Open Tampermonkey's Dashboard and click at the script's name. Click at the 'Storage' if present and check or modify the stored data as needed. If there is no 'Storage' tab, then the script has no data stored.


1 Answers

Tampermonkey scripts are super easy to update via the Tampermonkey tab. See the Tampermonkey FAQ, or just try it.

Tampermonkey scripts were stored in a special SQLite database and were/are not directly editable in file form.
Update: As of version 3.5.3630, Tampermonkey scripts are now stored using Chrome's extension storage. They are still not editable in file form, but the developer of Tampermonkey (derjanb) has helpfully made a Python script to extract them.


Chrome Userscripts (not the same as Tampermonkey scripts) are stored as follows, for the Chrome and Chromium browsers:

 Windows XP:   Chrome  : %AppData%\..\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions\   Chromium: %AppData%\..\Local Settings\Application Data\Chromium\User Data\Default\Extensions\    Windows Vista/7/8:   Chrome  : %LocalAppData%\Google\Chrome\User Data\Default\Extensions\   Chromium: %LocalAppData%\Chromium\User Data\Default\Extensions\  Linux:   Chrome  : ~/.config/google-chrome/Default/Extensions/   Chromium: ~/.config/chromium/Default/Extensions/  Mac OS X:   Chrome  : ~/Library/Application Support/Google/Chrome/Default/Extensions/   Chromium: ~/Library/Application Support/Chromium/Default/Extensions/ 

See this answer or this Google Groups thread.
Note that Chrome userscripts are automatically made into Chrome extensions with an auto-generated manifest.

However:

  1. Editing these files in place will not work. Chrome ignores and/or overwrites the changes.
  2. For Userscripts, set up your environment as in this answer, for easy editing and updating.
  3. Tampermonkey scripts are not stored the same way. They are stored, by Tampermonkey in a special SQLite database and are not directly editable that way. UPDATE: This was changed with version 3.5.3630, or so. See above.
like image 99
Brock Adams Avatar answered Sep 29 '22 13:09

Brock Adams