Fixed changing names on AJAX pages

This commit is contained in:
Amjad Mash'al 2015-03-26 01:02:34 +02:00
parent ca6f058188
commit 4634c26844
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
//...
});