--
Scenario: Chrome Extension listens on content changes of a specific website.When the Website adds a DIV with a specific class I want to reject that change and/or add additional content to that DIV.I did not find a way to achieve this. This is my example code:var observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { [].slice.call(mutation.addedNodes).forEach(function (addedNode) { StartFilter(addedNode); }); }); }); observer.observe(document, { childList: true, subtree:true, characterData:true, attributes:true }); function StartFilter(newNode) { $(newNode).find('.Xx.xJ:Contains("wham")').closest("[jsmodel='XNmfOc']").hide(); }
the content inside "newNode" is hidden but that does not appear to have any effect on the site itself.
You received this message because you are subscribed to the Google Groups "mutation-summary-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mutation-summary-d...@googlegroups.com.
To post to this group, send email to mutation-sum...@googlegroups.com.
Visit this group at http://groups.google.com/group/mutation-summary-discuss.
For more options, visit https://groups.google.com/d/optout.