Last active
January 13, 2016 11:23
-
-
Save The-Quill/65c93beae5cf983381c8 to your computer and use it in GitHub Desktop.
Mutation Observers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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