Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. var target = selector_for_element_containing_text ; // the selector is: document.querySelector('.audience-info > div:nth-child(1)');
  2. var observer = new MutationObserver(function(mutations) {
  3. mutations.forEach(function(mutation) {
  4. modifyElements();
  5. });
  6. });
  7. var config = { attributes: true, childList: true, characterData: true, subtree: true };
  8. observer.observe(target, config);
  9.  
  10.  
  11. function modifyElements(){ // This is just the current code of my script
  12. // modify element 1
  13. // modify element 2
  14. // modify element 3
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement