Access localStorage webpage from Chrome extension

I am developing a chrome extension that requires the values ​​(plugin) to be retrieved from local storage, where the values ​​are stored on other web pages that I created

In short: access localStorage webpage from Chrome script extension

+7
google-chrome local-storage google-chrome-extension
source share
1 answer

I just tested it, and if you access localStorage from the context of the script content, you get the localStorage web page. Thus, nothing more is required except pasting the contents of the script into the web page you need.

To report the value from the contents of the script, you can use the Messaging API , and you can use the chrome.storage.local API to save the data so that it is accessible both from the contents of the script and from the background page.

+5
source share

All Articles