I feel like I’m missing something incredibly obvious here.
I am building a Chrome Extension, and I want to be able to retain data specific to the page being viewed that affects the popup.html.
A simple example would follow these steps:
– Open a tab to google.com
– Click Extension icon to open Popup, background is blue.
– Save note to localStorage that Popup has opened. Close Popup.
– Open Popup again, background is green because of localStorage setting.
– Open a tab to yahoo.com
When I open the popup on the yahoo.com tab, I want the background to be blue, but localStorage is specific to the popup, not to the tab so the background will actually be green.
How can I store data in the popup that is specific to the tab the user is viewing?
Reposting from the comments above: