[RESOLVED] Yahoo stealing focus - noscript messing things up

Ask for help about NoScript, no registration needed to post
TooCrooked
Posts: 19
Joined: Sun May 02, 2010 9:51 pm

[RESOLVED] Yahoo stealing focus - noscript messing things up

Post by TooCrooked »

Hi,

I should be able to prevent yahoo from stealing my focus using the following code in my prefs.js file:

Code: Select all

user_pref("capability.policy.policynames", "nofocus");
user_pref("capability.policy.nofocus.sites", "http://www.yahoo.com http://m.www.yahoo.com");
user_pref("capability.policy.nofocus.HTMLInputElement.focus", "noAccess");
That code verifiably works in a clean install of firefox 3.6.3 (current as of today). the SECOND you install noscript, this code stops functioning. In my test environment as of today, there are two domains that require enablement so that yahoo can do what it does. they are the "yahoo" and "yimg" domains.

I want yahoo to be able to run scripts. i do not want yahoo to be able to change my cursor focus. most importantly, i do not want to globally prevent sites from being able to change the focus; only yahoo. i simply want to keep using noscript like usual, but prevent one domain from doing one thing.

please advise.
Last edited by TooCrooked on Thu May 06, 2010 8:18 am, edited 3 times in total.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Ant.com Toolbar 2.0 Firefox/3.6.3 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Yahoo stealing focus - noscript messing things up

Post by Giorgio Maone »

NoScript is currently the main and more complex CAPS client, and it's quite difficult to use CAPS for other purposes when NoScript is installed (even if they're theoretically compatible, in practice they're very difficult or nearly impossible to adapt to NoScript's presence).

Furthermore, most if not all the fine-grained CAPS features, beside selective script blocking because of NoScript backward compatibility, are going to be removed in future Firefox versions for performance reasons.

Fortunately you can use Surrogate Scripts for the same purposes (and, in most cases, in a more compatible ways).
In your case,

Code: Select all

user_pref("noscript.surrogate.nofocus.sources", "@.www.yahoo.com");
user_pref("noscript.surrogate.nofocus.replacement", "HTMLInputElement.prototype.focus=function(){}");
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: Yahoo stealing focus - noscript messing things up

Post by dhouwn »

Giorgio Maone wrote:Furthermore, most if not all the fine-grained CAPS feature, beside selective script blocking because of NoScript backward compatibility, are going to be removed in future Firefox version for performance reason.
Really? :cry:
I couldn't find any Bugzilla entry to this but it sounds reasonable.
I wonder if they could give us as a compensation the right handles to make Noscript's surrogate-script-feature more powerful, e.g. by allowing surrogate scripts to override read-only objects/properties.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100501 Firefox/3.7
TooCrooked
Posts: 19
Joined: Sun May 02, 2010 9:51 pm

Re: Yahoo stealing focus - noscript messing things up

Post by TooCrooked »

Giorgio, i'm in your debt despite the fact that im not familiar with "CAPS". Hopefully this helps other 'netters in the future
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Ant.com Toolbar 2.0 Firefox/3.6.3 (.NET CLR 3.5.30729)
Post Reply