[Greasemonkey] Re: Closing firefox tabs
Bill Donnelly
donnelly at snowcrest.net
Tue Jun 20 04:34:01 EDT 2006
unless you request and allow 'extra privileges' which tends to be a pain
Vectorspace wrote:
> I think you mean if the window was opened from javascript... :)
>
> If the window was opened by a script it can be closed by a script.
>
> Otherwise it cannot be.
>
> Nikolas Coukouma wrote:
>> -----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-----
>>
>> _______________________________________________
>> Greasemonkey mailing list
>> Greasemonkey at mozdev.org
>> http://mozdev.org/mailman/listinfo/greasemonkey
>>
>>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list