[Greasemonkey] Re: Closing firefox tabs

Nikolas Coukouma atrus at atrus.org
Tue Jun 20 06:48:57 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Steve Randles wrote:
> What I want to be able to do is to simply close the firefox tab when the
> "buy" button is clicked, so that I buy and then the tab goes away.
If the script was opened from JavaScript, then it can be closed from JS.
For exmple:
a = window.open()
alert(a) // pause
a.close()

However, the following  does not
close() // equivalent to window.close()

The error is:
Scripts may not close windows that were not opened by script.

This does seem like a good candidate for a GM_ api function.

Cheers,
- -Nikolas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFEl8SJs2zR4YuWmeERA1UNAJ9BMVkj91Oi4GVCBlgw5YGMRXAtYwCfeFnq
9tdKQZIgr1c2IZp+3HlW0fg=
=Bf9W
-----END PGP SIGNATURE-----



More information about the Greasemonkey mailing list