Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .