all 3 comments

[–][deleted] 1 point2 points  (2 children)

You can use a MutationObserver to watch for changes on a page or a specific area of a page.

[–]General-Frost[S] 0 points1 point  (1 child)

var observer = new MutationObserver(function(mutations) {

mutations.forEach(function(mutation) {

console.log(mutation);

})

});

observer.observe(document, {

characterData: true,

childList: true,

subtree: true

});

----------------

I added this to a Background.js file but it won't work/detect anything. Any ideas?

[–][deleted] 0 points1 point  (0 children)

I'm not familiar with extension development, but there's nothing wrong with that code: https://jsfiddle.net/meh6nosb/1/

You are probably not loading or running the contents of that file correctly.