General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
disallow all "stupid" javascript code?
Posted by: MaxAuthority
Date: January 13, 2003 05:19AM

is it possible to disallow all "stupid" javascript code?

I hate it when some javascript popup restores my maximized k-meleon window to a certain size and even hides menubar, toolbar and url bar.

And in the preferences there is a box where you can disable popups an certain domains. It would be nice if there were also an option to ALLOW popups on certain sites, when "disable popups on load/unload" is activated. (My online banking wouldn't load up, when "disable popups on load/unload" is activated.)

And the last stupid question: Is there a version 0.71 planned for the next weeks/months, or will we have to wait a year like last time? Or is there an inofficial version somewhere in the net?

have a nice day,

MaxAuthority

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: Stefan
Date: January 13, 2003 12:07PM

> is it possible to disallow all "stupid" javascript code?

Try out these settings.

pref("dom.disable_window_open_feature.titlebar", false);
pref("dom.disable_window_open_feature.close", false);
pref("dom.disable_window_open_feature.toolbar", false);
pref("dom.disable_window_open_feature.location", false);
pref("dom.disable_window_open_feature.directories", false);
pref("dom.disable_window_open_feature.personalbar", false);
pref("dom.disable_window_open_feature.menubar", false);
pref("dom.disable_window_open_feature.scrollbars", false);
pref("dom.disable_window_open_feature.resizable", false);
pref("dom.disable_window_open_feature.minimizable", false);
pref("dom.disable_window_open_feature.status", false);

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: Hugo
Date: January 13, 2003 12:51PM

..or get yourself a personal little proxy, like Proxomitron. Intelligent filters, javascript included. Very configurable. And there's a bypass button you can click to turn off the filters (when doing banking etc)

http://www.proxomitron.org/

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: asmpgmr
Date: January 13, 2003 03:36PM

You can also disable Javascript entirely except for specific sites by using policies, for example:

user_pref("capability.policy.default.javascript.enabled", "noAccess");
user_pref("capability.policy.policynames", "jsok");
user_pref("capability.policy.jsok.javascript.enabled", "allAccess");
user_pref("capability.policy.jsok.sites", "https://www.goodsite.com about:");

Will only allow Javascript to execute on site http://www.goodsite.com and any about: pages (like about:plugins).

Conversely you can disable Javascript for specific sites:

user_pref("capability.policy.default.javascript.enabled", "allAccess");
user_pref("capability.policy.policynames", "nojs");
user_pref("capability.policy.nojs.javascript.enabled", "noAccess");
user_pref("capability.policy.nojs.sites", "http://www.badsite.com http://stupidpopupsite.com");

In both cases you can list as many sites as you want in the site list.

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: asmpgmr
Date: January 13, 2003 03:39PM

You can also disable Javascript entirely except for specific sites by using policies, for example:

user_pref("capability.policy.default.javascript.enabled", "noAccess");
user_pref("capability.policy.policynames", "jsok");
user_pref("capability.policy.jsok.javascript.enabled", "allAccess");
user_pref("capability.policy.jsok.sites", "https://www.goodsite.com about:");

Will only allow Javascript to execute on site http://www.goodsite.com and any about: pages (like about:plugins).

Conversely you can disable Javascript for specific sites:

user_pref("capability.policy.default.javascript.enabled", "allAccess");
user_pref("capability.policy.policynames", "nojs");
user_pref("capability.policy.nojs.javascript.enabled", "noAccess");
user_pref("capability.policy.nojs.sites", "http://www.badsite.com http://stupidpopupsite.com");

In both cases you can list as many sites as you want in the site list.

Options: ReplyQuote
Thank you VERY much!
Posted by: MaxAuthority
Date: January 24, 2003 10:21PM

Really THANK YOU.

Nice to see a really cool community where everybody tries to help others!

BTW:
I would also add
user_pref("dom.disable_window_move_resize", true);

But I could not "google out" what:
pref("dom.disable_window_open_feature.location", false);
pref("dom.disable_window_open_feature.directories", false);

these options mean.

Any clue?

Best regards :-),

MaxAuthority

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: MaxAuthority
Date: January 24, 2003 11:18PM

obviously,

user_pref("dom.disable_window_move_resize", true);

does not fully work sad smiley

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: zack
Date: January 26, 2003 03:17AM

where do i put these user_pref things?

-zack

Options: ReplyQuote
Re: disallow all "stupid" javascript code?
Posted by: Ismo
Date: January 26, 2003 03:51AM

zack,

From Edit menu choose Preferences, then Configs from the left panel. Click the
Prefs tab, make a new empty line and copy and paste your user_pref lines
from here (less errors thus). Restart your broser - without quick start loader -
to see the changes .

Of course you can also edit the Prefs.js file by hand with an ascii-editor (notepad).

Options: ReplyQuote


K-Meleon forum is powered by Phorum.