I am developing a simple chrome extension that reads text from a webpage and displays it on the popup. When I have multiple different tabs open and I switch between them, the value in every tab's popup gets changed to value of the most recently opened tab. How can make each tab's popup display its own text?
Asked
Active
Viewed 107 times
0
-
1Depends on how that text is displayed. For chrome.browserAction.setBadgeText you can specify `tabId` in parameters, see the documentation. Otherwise you should show your code and manifest.json in the question. – wOxxOm Apr 07 '20 at 19:09
-
1Welcome to StackOverflow! Agree with wOxxOm that this question requires a minimal code snippet demonstrating the failure mode, in order for people to offer meaningful feedback. If you're not familiar with the idea, this means "create the simplest possible piece of code that still breaks in the way you describe." – Alterscape Apr 07 '20 at 19:24
-
Does this answer your question? [Chrome extension: load different content scripts](https://stackoverflow.com/questions/7563379/chrome-extension-load-different-content-scripts) – Chamilyan Apr 08 '20 at 00:17