I want to execute a content script function whenever a tab is updated. The problem is that, sometimes the tab update is ajax (without a page reload), while still changing the page's url. Therefore the old content script injected still exists on the page. The result is multiple instances of content script injected and running on the same page.
So, I'm looking for a mechanism to inject a content script, only if no same content script has been injected before. Any ideas?