hanjustin
hanjustin

Reputation: 169

How to figure out where this Chrome extension is storing data?

I found this Chrome extension called Better Search that has a lot of Google search customization I can do. It is great, but the sync functionality just doesn't seem to work for multiple devices. So I'm trying to figure out a way to do a manual sync by importing & exporting my saved data as it seems to do a local saving somewhere.

How can I figure out where this extension stores data? Alternately, how can I import & export the data for this extension?

Upvotes: 0

Views: 139

Answers (1)

Makyen
Makyen

Reputation: 33306

The only real answer to this is: download the source code and look. The extension Chrome extension source viewer may be helpful in doing so.

If it is a relatively current extension, then the data will be stored in chrome.storage. If it does not sync data, then it is probably in chrome.storage.local. If the data syncs, then it is probably in chrome.storage.sync. If it is an older extension, it might be using localStorage.

If it has a lot of options, then it is probably displaying an options page, which will likely contain the code to store the options. You will need to look in the HTML page that is pointed to by the value of the page key within the options_ui key within the manifest.json file. That HTML page will contain at least one <script> with will have a src attribute that will tell you the file which contains the JavaScript for the options page. See the above link for other possible keys which might be used if it is an older extension.

"options_ui": {
    "page": "ThisHtmlFile.html"
}

It is also possible that it only displays its options in a popup. In that case, you will need to look for the value of the default_popup key within the browser_action, or page_action, key in the manifest.json file. As with an option page, that HTML file will contain a <script> tag with a src attribute which will tell you the JavaScript file you should look in first.

"browser_action": {
    "default_popup": "ThisHtmlFile.html"
}

Upvotes: 1

Related Questions