How to block auto refresh on permitted websites

Ask for help about NoScript, no registration needed to post
asd
Posts: 3
Joined: Fri Jan 01, 2010 2:04 pm

How to block auto refresh on permitted websites

Post by asd »

Hi,
I'm bothered by the auto refresh function that you can find in some web sites like http://www.repubblica.it/ or http://www.corriere.it/ . You are reading and the page auto refresh and maybe even change the text you were reading...
This tip doesn't work: http://www.mydigitallife.info/2009/07/2 ... n-firefox/
It seems that they can refresh the page using scripts, that I have to permit to read correctly the page.
So the subject: is there a way to deny auto refresh on permitted websites using noscript?
Last edited by asd on Sat Jan 02, 2010 10:31 am, edited 1 time in total.
Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
Mc

Re: How to block auto refresh on permitted websites

Post by Mc »

Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.6) Gecko/20091206 Lightning/1.0b1 SeaMonkey/2.0.1
asd
Posts: 3
Joined: Fri Jan 01, 2010 2:04 pm

Re: How to block auto refresh on permitted websites

Post by asd »

RefreshBlocker "does not block JavaScript-based and HTTP-based redirects", that is my problem. The same with Tools|Options|Advanced|General and tick the "Warn me whenever a web site tries to redirect me" checkbox, as you can read on the link I posted.
Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
Alan Baxter
Ambassador
Posts: 1586
Joined: Fri Mar 20, 2009 4:47 am
Location: Colorado, USA

Re: How to block auto refresh on permitted websites

Post by Alan Baxter »

asd wrote:So the subject: there's a way to deny auto refresh on permitted websites using noscript?
I'm bothered by that too at times. RefreshBlocker and NoScript aren't sufficient to work on all problematic sites. There are GreaseMonkey solutions for some sites, such as Drudge Report, and Adblock Plus solutions for others such as the NY Times.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: How to block auto refresh on permitted websites

Post by Giorgio Maone »

Surrogate Scripts are your friends.

Open about:config and create the following string preferences:

noscript.surrogate.antirefresh.replacement

Code: Select all

window.setTimeout=function(f){return/\blocation(?:\s*\.\s*href)?\s*(?:=|\.reload)/.test(f)?-1:window.__proto__.setTimeout.apply(window,arguments);}
noscript.surrogate.antirefresh.sources

Code: Select all

@www.corriere.it www.repubblica.it
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
asd
Posts: 3
Joined: Fri Jan 01, 2010 2:04 pm

Re: How to block auto refresh on permitted websites

Post by asd »

Giorgio Maone wrote:Surrogate Scripts are your friends.

Open about:config and create the following string preferences:
[...]
[/code]
It works flawlessly for corriere.it. For repubblica.it it works if you enable also "Warn me whenever a web site tries to redirect me".

Thank you :)
Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)
Post Reply