Skip to content
Advertisement

Proxy Chrome Storage

I am trying to get my proxy chrome extention to keep on/off after closing using chrome.local.storage. This does not seem to work, can anyone give some examples on how to get this kind of code working?

Right now my pac proxy works and turns on and off. The local storage does not seem to work at all, but I followed all the examples on the developer.chrome website. That does not work.

JavaScript

Advertisement

Answer

Most apis within Chrome extensions are asyncronous. See the documentation here. You can provide a callback as the second argument to the ‘get’ function where you can use the variable:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement