Can someone please show me how to use the chrome.tabs.onActivated
.
I would like to refresh the tab that is clicked/activated if the url equals: www.example.
Firstly, be sure to put "tabs" permission in your manifest.json
file. Then, use chrome.tabs.onActivated
in your background page script. Each time this event will be called you will get activeInfo
object containing currently active tab ID. Having this ID you can fetch the tab and see what URL is it set to. When you are certain that this is a tab you are looking for (URL matches) you can reload it.