Merge pull request #5 from TheNavigat/master

Fixed changing names on AJAX pages
This commit is contained in:
Mariam M. 2015-03-26 01:08:34 +02:00
commit 36bde5aaa8
1 changed files with 12 additions and 0 deletions

View File

@ -48,4 +48,16 @@ function handleText(textNode)
textNode.nodeValue = v; textNode.nodeValue = v;
} }
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var observer = new MutationObserver(function(mutations, observer) {
loadReplace();
});
// define what element should be observed by the observer
// and what types of mutations trigger the callback
observer.observe(document, {
subtree: true,
childList: true
//...
});