Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var config = { attributes: true, childList: true, characterData: true };
  2. var target = document.body;
  3. var timer;
  4.  
  5. // create an observer instance
  6. var observer = new MutationObserver(function(mutations) {
  7.  
  8. // fired when a mutation occurs
  9. timer = setTimeout(function () {
  10.  
  11. _3rd_party_callback();
  12.  
  13.  
  14. }, 500);
  15.  
  16. });
  17.  
  18. observer.observe(target, config);
  19.  
  20. observer.disconnect()
  21. _3rd_party_callback();
  22. observer.observe(target, config);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement