[Greasemonkey] Closing firefox tabs
Vectorspace
vectorspace at ntlworld.com
Tue Jun 20 18:51:38 EDT 2006
I just tried top.close() from a GM script and I still got a "Scripts may
not close windows that were not opened by script." message in the console.
Dave Land wrote:
> On Jun 20, 2006, at 2:20 AM, Steve Randles wrote:
>
> Scripts are prevented from using window.close() to dismiss windows
> that they did not open to prevent script kiddies from maliciously
> closing your windows for you...
>
> On the other hand, top.close() seems to do the trick.
>
> I suppose the general model, then, would be to write a GM script that
> detects the page that is returned in response to a successful "buy"
> button click, and execute top.close().
>
> I am sorry that I didn't take the time to write a script that does
> this — but I did want to pass along a little experience from a guy who
> found that window.close() merely logs "Scripts may not close windows
> that were not opened by script."
More information about the Greasemonkey
mailing list