I will try my best to explain this.
I am developing a chrome extension that substitutes the new tab page. On this new tab page the user is able to give some information about him or herself and it is saved in chrome.storage.sync.
This new tab page has a background image that changes and grabs the image by making an API request.
Now... I want to be able to change the image AKA MAKE THE API REQUEST, even when the user is not currently on a "new tab page" (e.g. do the API request while he or she is watching a youtube video).
Now for this I would need an eventPage.js (background.js in the past). This much I know.
However, the API request takes in some parameters depending on the users information. So I need to go get the information.
Now how would I access from the eventPage.js -> chrome.storage.local when the user is on another page? I did inspect with storageAreaExplorerwhen I am on another page that is not a new tab page and I can NOT see the users information. And I also think this is why my eventPage.js can not make the API call. Is there away so that localStorage is available to the eventPage.js even when the user is not on the new tab page?