Search code examples
google-chrome-extension

Deploy Chrome extension settings update?


I work in a corporate environment and we are trying to deploy settings for a Chrome extension to minimize user required steps. I've learned that these settings are stored in a leveldb located at %localappdata%\Google\Chrome\User Data\Default\Local Storage\leveldb

I'm having trouble finding an existing solution for this. I am personally limited to powershell or vbscript and I'm comfortable with working with binary data. I would like to know if there is some API I can use to edit these settings of if I'm going to have to ensure that Chrome is closed and modify the db directly? If I can modify the db from powershell or vbscript then that would be ideal. If this requires a compiled app then I'll start going down that path

It looks like if we deploy the log file from the local extension settings folder that the settings seem to apply but this to me seems like a glitch/hack and not something we should rely on. Any ideas? Thoughts?


Solution

  • I offer you a solution that you may not like. Editing \ replacing the .ldb files may invalidate the extension. Have you already done a test replacing this file(s) to see if it works?

    If you have developed the extension (or if you have some relationship with the developer) you could ask users to inspect the extension options page (or background script) and paste a script into the devtoolos console.

    Normally the extension parameters are stored in the localStorage or in the chrome.storage object but they could also be in an indexexDB. So it shouldn't be too difficult to create that script and explain the steps to users. Maybe you can even make a short explanatory video.