There is a web site with this snippet in every page:
var refreshSite;
refreshSiteInterval();
function refreshSiteInterval() {
refreshSite = setInterval(
function() { document.location = document.location; },
420000);
};
function stopRefreshSite() {
clearInterval(refreshSite);
}
Calling stopRefreshSite()
from javascript console stops the timed refresh from occurring.
I'd like to disable this recurring refresh with a chrome extension. I thought that a content script which calls stopRefreshSite()
whenever the page loads makes sense, though because content scripts execute in an isolated world this doesn't seem to be possible.
Is there any way to call the webpage function? Or would trying to prevent the original javascript from running in the first place be a better strategy?