Hey there!
I use NoScript and I like it a lot. It would be great if it allowed blocking selected JavaScript functions, because some pose a serious threat to privacy (such as those reading your screen resolution) by fingerprinting. How about that?
Thanks!
wwj
Disallowing specific JavaScript functions
Disallowing specific JavaScript functions
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090703 Firefox/3.5
- Giorgio Maone
- Site Admin
- Posts: 9527
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Disallowing specific JavaScript functions
You can use script surrogates for this purpose.
E.g., to always return random screen resolution values,
E.g., to always return random screen resolution values,
Code: Select all
["screenWidth", "screenHeight"].forEach(function(p) { window.__defineGetter__(p, function() { return Math.round(800 * Math.random()) + 800 }) })
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Re: Disallowing specific JavaScript functions
Wow, that is great, thanks! But still, I think it'd be nice to have an easy-to-use interface that would make doing this simple. 

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090703 Firefox/3.5
Re: Disallowing specific JavaScript functions
You might want to try Controle de Scripts. Its comprehensive help site can be found here.
Mozilla/5.0 (X11; U; Linux x86_64; de-DE; rv:1.9.2.14pre) Gecko/20101231 Ubuntu/10.10 (maverick) Namoroka/3.6.14pre
Re: Disallowing specific JavaScript functions
That's all great, thanks a lot guys, but I guess the best defense against fingerprinting would be the same NoScript assumes -- whitelisting by default, so one'd have to block all JS, and then enable specific functions, and unfortunately neither provide this ability.
Do you have any other ideas?
Thanks!
wwj

Thanks!
wwj
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090703 Firefox/3.5