[Greasemonkey] idea for once 0.5 is out
Mark Pilgrim
pilgrim at gmail.com
Mon Aug 1 09:38:57 EDT 2005
On 8/1/05, Ted Mielczarek <ted.mielczarek at gmail.com> wrote:
> The problem is, where do you get the windows to make thumbnails of?
> Since drawWindow requires an existing window, you can't show previews
> of links, and I don't think GM scripts can enumerate open windows/tabs
> to get at their window objects.
Well actually, I was experimenting with this last night, and GM could
very easily expose an API that allowed user scripts to take
screenshots of other open windows/tabs. I am *not* advocating this, I
think it's a very very scary idea, but it's possible in chrome, so if
GM wanted to make it available to user scripts, it could.
More useful and less scary, perhaps, is an API that allows a user
script to take a screenshot of the current content window (not the
tabs, not the menubar, and certainly not other open content windows).
User scripts could keep track of pages visited and construct a
graphical history later (or whatever). It may even be possible to
prefetch other pages into a hidden iframe and render them (not sure
about that).
I have a patch that enables this. The only problem is that the canvas
context is supposed to support a toDataURL() method --
https://bugzilla.mozilla.org/show_bug.cgi?id=291218 -- but it doesn't
look like this is going to make it into Firefox 1.5. So you can draw
anything you like, but you can't save it and retrieve it later. Which
is significantly less useful, and quite disappointing.
--
Cheers,
-Mark
More information about the Greasemonkey
mailing list