I am using a chrome extension to inject code into web pages to change parts of the text if they match a certain string. It replaces the text correctly, but seems to hold the web page in an endless state of loading, and messes up certain elements on sites like Facebook.
var actualCode = '(' + function() {
document.body.innerHTML = document.body.innerHTML.replace(/10:00/g, "11:00 AM");
} + ')();';
var script = document.createElement('script');
script.textContent = actualCode;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
See Question&Answers more detail:os