Phuc1980 / scriptno

Automatically exported from code.google.com/p/scriptno
0 stars 0 forks source link

Synchronous WebRequest API #161

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is a feature request.

If SafeScript uses the Synchronous webrequest API results from 
isjavascriptenabled.com may be more consistent, though not perfect.

I think right now SafeScript uses OnBeforeSendHeaders but I believe it should 
be able to use OnBeforeRequest. And it has to be explicitly set to opt out of 
asynch, I believe.

https://developer.chrome.com/trunk/extensions/webRequest.html

Original issue reported on code.google.com by ColinTre...@gmail.com on 31 Dec 2012 at 4:37

GoogleCodeExporter commented 9 years ago
And I realize the OnBeforeRequest may be too early. Just curious/ hoping that 
if the synchronous aspect hasn't been made use of, that it will be.

Original comment by ColinTre...@gmail.com on 31 Dec 2012 at 4:38

GoogleCodeExporter commented 9 years ago
I just tested it using OnBeforeRequest on 
http://www.ismyjavascriptenabled.com/results.html, and it's odd, it doesn't 
seem to be as consistent as OnBeforeSendHeaders. ScriptSafe has always been 
using OnBeforeRequest and OnBeforeSendHeaders in synchronous mode as well 
(determined by setting "blocking" as a parameter).

To address this, I've put the chrome.contentSettings.javascript.set line in 
BOTH the OnBeforeRequest and OnBeforeSendHeaders APIs, and it seems inline 
script blocking (on that test site at least) is more reliable, especially when 
refreshing it quickly. This will be included in v1.0.6.11.

There is no duplication in the contentSettings API as the entries for the site 
are cleared upon page completion.

Thanks!

Original comment by andr...@gmail.com on 1 Jan 2013 at 7:38

GoogleCodeExporter commented 9 years ago
v1.0.6.11 with this update has been released.

Original comment by andr...@gmail.com on 2 Jan 2013 at 2:56