Как я могу отфильтровать определенные javascript-скрипты от запуска и не блокировать их все в Drudge Report?

781
jay

Как заблокировать запуск этого конкретного сценария «автообновления» в Drudge Report в моем браузере Firefox в Windows XP?

var timer = setInterval("autoRefresh()", 1000 * 60 * 3);  function autoRefresh() 

У меня установлены плагины NoScript и AdblockPlus, но ни один из них не объясняет, как отфильтровать конкретный сценарий и как он будет работать, а остальные оставить в покое. Я не хочу, чтобы все javascript-скрипты запускались, как указано ниже.

Любая помощь будет оценена.

3

1 ответ на вопрос

0
D-Money

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() { }