Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I block this particular "auto refresh" script on Drudge Report from running in my Firefox browser on Windows XP?

var timer = setInterval("autoRefresh()", 1000 * 60 * 3); 
function autoRefresh(){self.location.reload(true);}

I have NoScript and AdblockPlus plugins installed, but neither of them explain how to filter out a particular script and keep it from running and leave the rest alone. I don't want to stop all javascripts from running just the one listed below.

Any help would be appreciated.

share|improve this question
add comment

1 Answer

At first, I thought you could stop the interval from running, but this will only work if you can get to the context of the timer variable.

/* your code in another file */
clearInterval(timer);

My next idea is to redefine the autoRefresh function. It looks like that may be able to be done because the interval is referring to autoRefresh in a string instead of using a function, like

setInterval(function(){ autoRefresh(); }, 1000 * 60 * 3);

Anyway, you would have to redefine autoRefresh like this:

autoRefresh() { }
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.