keep javascript from changing window properties

Leo Savernik l.savernik at aon.at
Fri Oct 11 14:17:28 BST 2002


Am Freitag, 11. Oktober 2002 12:19 schrieb David Faure:
> On Thursday 10 October 2002 22:36, Leo Savernik wrote:
> > That will keep some pages from resizing my carefully sized window or to
> > move it to another position. I also can't stand those pages which pop
> > into the foreground unexpectedly and interrupt my workflow and which
> > think that they are smarter than me for not letting me see the real url
> > of links in the status bar.
>
> Looks good. But one problem is that this kind of behaviour is usually ok
> (and necessary) on one site, and annoying on another. So this kind of
> setting should be configurable on a host/domain basis.
>
Ahem, I can't imagine of *any* page that will break when it cannot resize or 
move the browser window because those properties do absolutely contribute 
nothing to the page content. It's totally different from window.open, which 
*will* break existing pages when blocked too intensively because then the 
page content destined to appear in the new windows would not load.

I'm of the opinion that resizing/moving windows per javascript is 99.9% 
annoying, that's why I only proposed global settings.

> I think the KControl module should be extended so that it keeps a single
> main list of hosts and domains, but for each entry one can define not only
> JS on/off as currently, but also
> * the window popup policy
> * all the things you want to add.

If you really want all JS/Java/Cookie options configurable on a domain basis, 
then please consider it doing in a non-sucking way:

- have global settings (as it is mostly now)
- for every per-domain setting, provide the option "use global".

Please do *not* scrap the global options in favor of per-domain settings as I 
think most users would not need them anyway. Then each option within the 
per-domain settings should be prefixed with a "[x] use global" checkbox 
initially checked and the options grayed out. If and only if the user 
disables the "use global" this option for the specific per-domain setting 
becomes editable and takes effect. Well, here a little illustration what I 
mean:

Domain foo.bar.com

enable java: [x] use global [ ] yes [ ] no
enable javascript: [x] use global [ ] yes [ ] no
 window.open policy: [x] use global [ ] always [ ] never [ ] ask [ ] smart
 window.resize policy: [x] use global [ ] allow [ ] deny
 window.move policy: [x] use global [ ] allow [ ] deny
 window.status policy: [x] use global [ ] allow [ ] deny
 ... and all the other setting following the above scheme

This allows pre-domain settings to only overwrite specific global options and 
inherit the other global options.

Well, I digress, I haven't thought about gui and domain-specific implications 
at all when writing that patch. As far as I am concerned I would be perfectly 
happy if resizing and moving policies would be implemented at the primitive 
level in kde 3.2 I proposed.

mfg
	Leo Savernik




More information about the kfm-devel mailing list