0

My background script is collecting data. I want it to update a table on the main page whenever it is in view. Is this possible?

rolandnsharp
  • 281
  • 1
  • 4
  • 13
  • See here, this seems to be close to what you want: http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active – Nick Louloudakis Aug 17 '13 at 12:23

1 Answers1

0

You will need permission to access the tab data.

manifest.json:

{
  "name": "My extension",
  ...
  "permissions": [
    "tabs"
  ],
  ...
}

Then you can use the onActivated event.

chrome.tabs.onActivated.addListener(callback)

More information here: http://developer.chrome.com/extensions/tabs.html

Greg
  • 21,235
  • 17
  • 84
  • 107