Sites like YouTube and Facebook where as you scroll down more content is loaded. My JS injection works at first for content loaded at the beginner, but it no longer works on the new content. How do I solve this?
My JS:
$(".userContent:contains('the')").css("color", "green");
I tried the following but it didn't work:
chrome.tabs.onUpdated.addListener( function (tabId, changeInfo, tab) {
if (changeInfo.status == 'complete') {
// do your things
$(".userContent:contains('the')").css("color", "green");
}
})
What's the solution?