Add bookmark popup on this site

Discussion of features in Mozilla Firefox
Post Reply
old FatJohn
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Add bookmark popup on this site

Post by old FatJohn »

And I positively hate it. It's Javascript. Can it be disabled without turning off js? Unticking all advanced js options won't stop it if js is enabled...

Please take a look at http://forums.mozillazine.org/viewtopic.php?t=238142

Hardly a security issue but still very annoying. Never gonna visit that site again... ;) Nice going webmaster!

I remember lot's of annoying sites doing this back in my IE days. This is the first time I see this on Firefox. Been on fox some 4 months maybe. Have you seen this on fox?
Unarmed
Posts: 4941
Joined: July 31st, 2003, 1:26 pm

Post by Unarmed »

This snippet in user.js should disable it:

Code: Select all

user_pref("capability.policy.policynames", "sidebarAccess");
user_pref("capability.policy.default.Window.sidebar", "noAccess");
user_pref("capability.policy.sidebarAccess.sites", "http://www.mozilla.org http://mycroft.mozdev.org");
user_pref("capability.policy.sidebarAccess.Window.sidebar", "allAccess");


I couldn't find a more fine-grained way to do it (I wasn't sure what class <code>addSidebar</code> uses), so I just disabled access to all sidebar functions from any site but mozdev and mozilla.org -- this way, you can at least still add search engines.
old FatJohn
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old FatJohn »

Thank you for taking a look at this Unarmed. Can anyone think of some negative impact this solution might have? Or an alternate solution if you dislike this one and understand anything about this. I really don't.
Unarmed
Posts: 4941
Joined: July 31st, 2003, 1:26 pm

Post by Unarmed »

The negative impact is that only two sites will be able to use the <code>addPanel</code>, <code>addPersistentPanel</code>, and <code>addSearchEngine</code> methods. In practical terms, this means that no site can create the "Add Bookmark" dialog or add a search engine to the search bar except mozilla.org and MyCroft. So there is a chance that some legitimate uses of the code will be disabled.

If anyone can point me to the class containing <code>addPanel</code> it could be improved to only affect the "Add Bookmark" code. When checking on it myself, it appears that it's not a class member but rather from an interface, and I don't know how to specify that using CAPS.
old FatJohn
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old FatJohn »

OK, sounds very good to me. I don't want any sites giving me suggestions about bookmarking and don't plan on adding search engines either, except maybe manually... Thank you again!
Post Reply