Skip to content

Instantly share code, notes, and snippets.

@The-Quill
Last active January 13, 2016 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save The-Quill/65c93beae5cf983381c8 to your computer and use it in GitHub Desktop.
Save The-Quill/65c93beae5cf983381c8 to your computer and use it in GitHub Desktop.
Mutation Observers
var messages = document.getElementsByClassName("messages");
var ChatObserver = new MutationObserver(function(data){
console.log(data);
ReplaceText(messages[messages.length]);
});
ChatObserver.observe(document.getElementById("chat"), {childList: true, attributes: true, characterData: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment