A Chrome content script is able to access the elements of a page. Currently, I'm using the following code to read all text in between paragraph tags:
$(document).ready(function(){
$("p").each(function(){
console.log($(this).text() );
});
})
The code will return all the text. However, in a page such as Facebook where the content is continually updated, the paragraphs that are brought in afterwards are not logged.
I noticed on Facebook, that a document containing the additional text named LitestandMoreStoriesPagelet
is loaded whenever I scroll to the bottom of the page. Is there a way to realize within the extension that such a request (or any request for that matter) is being made, and then call a javascript function to log the text?
My first attempt led me to this question, but I don't think it's relevant as it pertains to when the tabs are changed, not when resources are loaded.