Various chrome extensions store data about their settings and other persistent information (whitelists for adblock and ghostery, scripts for tampermonkey, styles for stylish, etc). Where do they store it? How can I view and edit it?
4 Answers
Some data Google Chrome stores in Local Storage folder in SQLite format (.localstorage files). See: How do I open Local Storage files in Google Chrome?
Some other data which is stored in IndexedDB folders (for each profile) (see: Where does Google Chrome save LocalStorage from Extensions?) are in LevelDB format. It's an open source key-value store format developed by Google and it is hosted on GitHub.
To modify files in LevelDB format outside of Chrome, it's not a straightforward process as you would need to implement a compatible comparator in order to inspect Chrome's Indexed DB leveldb instances. See: How to access Google Chrome's IndexedDB/LevelDB files?
- 26,615
Another profile folder worth looking into is Local Extension Settings, which contains LevelDB stores.
There's a question on Software Recommendations seeking a LevelDB client, but there doesn't seem to be many good free options. For the extension I was messing with, using the leveldb Python library was enough:
>>> import leveldb
>>> db = leveldb.LevelDB('path/to/Chrome profile/Local Extension Settings/extension id')
>>> # Available library methods
>>> dir(db)
['CompactRange', 'CreateSnapshot', 'Delete', 'Get', 'GetStats', 'Put', 'RangeIter', 'Write', ...]
>>> # List of keys
>>> [x[0] for x in db.RangeIter()]
[bytearray(b'accessToken'), bytearray(b'count'), bytearray(b'fullListArr'), ...]
>>> # Access keys with bytestrings
>>> db.Get(b'donated')
bytearray(b'true')
>>> # Put values with bytestrings
>>> db.Put(b'donated', b'false')
- 430
Maybe you could check these:
- What is store in Local Storage used for in Chrome?
- How do I open `.localstorage` files from Local Storage folder?
It looks like SQLite format (.localstorage extension files).
Edit: You could also check development tool, then Application tab > Local Storage.
E.g. on Adblock option page: 
(source: image-share.com)
This file corresponds to ...\Data\profile\Default\Local Storage\chrome-extension_gighmmpiobklfepjocnamgkkbiglidom_0.localstorage
Please note that any change you make on the local storage may be overwritten by the web application/extension etc.
- 4,158
- 11
An example to edit .sol files stored by ruffle chrome extension:
Navigate to DevTools => Application => Local Storage , select the extension/site/file. There are Key=Value entries. The value is a base64 string.
To continue this example, may be relevant also at this topic: use ruffle's "Save Manager" and modify it with minerva (has a github source code) and base64 to get the value.
Back at Key=Value, modify the Value.
It is not saved at this moment at Chrome. Navigate to "~/.config/google-chrome/Default/Local Storage/leveldb/" , there are archive .ldb files and a .log file that is the live ldb. Copy the .log file, close the browser, overwrite the .log file with the copy, restart the browser and the game should have the modified data now.
At Firefox I closed developer tools, and reopened to make sure it is ok, reloaded the page and was ok.
- 3